Gorgon
Show / Hide Table of Contents

Class DirectoryLocateService

A service used to locate a directory on the physical file system.

Inheritance
object
DirectoryLocateService
Implements
IDirectoryLocateService
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Editor.Services
Assembly: Gorgon.Editor.API.dll
Syntax
public class DirectoryLocateService : IDirectoryLocateService

Methods

| Edit this page View Source

GetDirectory(DirectoryInfo, string, Action<FolderSelectedArgs>, Action<FolderSelectedArgs>)

Function to show an interface that allows directory selection.

Declaration
public DirectoryInfo GetDirectory(DirectoryInfo initialDir, string caption = null, Action<FolderSelectedArgs> onSelected = null, Action<FolderSelectedArgs> onEntered = null)
Parameters
Type Name Description
DirectoryInfo initialDir

The initial directory to use.

string caption

[Optional] The caption for the dialog.

Action<FolderSelectedArgs> onSelected

[Optional] The method to call when a directory is selected.

Action<FolderSelectedArgs> onEntered

[Optional] The method to call when a directory is entered.

Returns
Type Description
DirectoryInfo

The selected directory, or null if cancelled.

Exceptions
Type Condition
ArgumentNullException

Thrown when the initialDir parameter is null.

Implements

IDirectoryLocateService

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author