Skip to main content

DirectoryFactory Class

IChannelFactory for ISharedDirectory.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/map/legacy.

For more information about our API support guarantees, see here.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export declare class DirectoryFactory implements IChannelFactory<ISharedDirectory>

Implements: IChannelFactory<ISharedDirectory>

Static Properties​

PropertyAlertsModifiersTypeDescription
AttributesBetareadonlyIChannelAttributesAttributes of the channel.
TypeBetareadonlyString representing the type of the factory.

Properties​

PropertyAlertsModifiersTypeDescription
attributesBetareadonlyIChannelAttributesAttributes of the channel.
typeBetareadonlystringString representing the type of the factory.

Methods​

MethodAlertsReturn TypeDescription
create(runtime, id)BetaISharedDirectoryCreates a local version of the channel. Calling attach on the object later will insert it into the object stream.
load(runtime, id, services, attributes)BetaPromise<ISharedDirectory>Loads the given channel. This call is only ever invoked internally as the only thing that is ever directly loaded is the document itself. Load will then only be called on documents that were created and added to a channel.

Property Details​

attributes​

Attributes of the channel.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get attributes(): IChannelAttributes;

Type: IChannelAttributes

Attributes​

Attributes of the channel.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

static readonly Attributes: IChannelAttributes;

Type: IChannelAttributes

type​

String representing the type of the factory.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

get type(): string;

Type: string

Type​

String representing the type of the factory.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

static readonly Type = "https://graph.microsoft.com/types/directory";

Method Details​

create​

Creates a local version of the channel. Calling attach on the object later will insert it into the object stream.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;

Parameters​

ParameterTypeDescription
runtimeIFluidDataStoreRuntimeThe runtime the new object will be associated with
idstringThe unique ID of the new object

Returns​

The newly created object.

Return type: ISharedDirectory

load​

Loads the given channel. This call is only ever invoked internally as the only thing that is ever directly loaded is the document itself. Load will then only be called on documents that were created and added to a channel.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedDirectory>;

Parameters​

ParameterTypeDescription
runtimeIFluidDataStoreRuntimeData store runtime containing state/info/helper methods about the data store.
idstringID of the channel.
servicesIChannelServicesServices to read objects at a given path using the delta connection.
attributesIChannelAttributes

Returns​

The loaded object

Return type: Promise<ISharedDirectory>