DirectoryFactory Class
The factory that defines the directory.
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
Static Properties
Property | Type | Description |
---|---|---|
Attributes | IChannelAttributes | Attributes of the channel. |
Type | String representing the type of the factory. |
Properties
Property | Type | Description |
---|---|---|
attributes | IChannelAttributes | Attributes of the channel. |
type | string | String representing the type of the factory. |
Methods
Method | Return Type | Description |
---|---|---|
create(runtime, id) | ISharedDirectory | Creates a local version of the channel. Calling attach on the object later will insert it into the object stream. |
load(runtime, id, services, attributes) | Promise<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 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
get attributes(): IChannelAttributes;
Type: IChannelAttributes
Attributes
Attributes of the channel.
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
static readonly Attributes: IChannelAttributes;
Type: IChannelAttributes
type
String representing the type of the factory.
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
get type(): string;
Type: string
Type
String representing the type of the factory.
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
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 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
create(runtime: IFluidDataStoreRuntime, id: string): ISharedDirectory;
Parameters
Parameter | Type | Description |
---|---|---|
runtime | IFluidDataStoreRuntime | The runtime the new object will be associated with |
id | string | The 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 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
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedDirectory>;
Parameters
Parameter | Type | Description |
---|---|---|
runtime | IFluidDataStoreRuntime | Data store runtime containing state/info/helper methods about the data store. |
id | string | ID of the channel. |
services | IChannelServices | Services to read objects at a given path using the delta connection. |
attributes | IChannelAttributes |
Returns
The loaded object
Return type: Promise<ISharedDirectory>