import { IChannelAttributes , IFluidDataStoreRuntime , IChannelServices , IChannelFactory , } from "@fluidframework/datastore-definitions" ; import { ISharedObject , } from "@fluidframework/shared-object-base" ; import { pkgVersion } from "./packageVersion" ; import { SharedSummaryBlock } from "./sharedSummaryBlock" ; sealed export class SharedSummaryBlockFactory implements IChannelFactory { /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
     */ public static readonly Type = "https://graph.microsoft.com/types/shared-summary-block" ; /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
     */ public static readonly Attributes : IChannelAttributes = { type : SharedSummaryBlockFactory . Type , snapshotFormatVersion : "0.1" , packageVersion : pkgVersion } ; /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory."type"}
     */ public get type ( ) { return SharedSummaryBlockFactory . Type ; } /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.attributes}
     */ public get attributes ( ) { return SharedSummaryBlockFactory . Attributes ; } /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
     */ public async load ( runtime , id , services , attributes ) { const sharedSummaryBlock = new SharedSummaryBlock ( id , runtime , attributes ) ; await sharedSummaryBlock . load ( services ) ; return sharedSummaryBlock ; } /**
     * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
     */ public create ( runtime , id ) { const sharedSummaryBlock = new SharedSummaryBlock ( id , runtime , SharedSummaryBlockFactory . Attributes ) ; sharedSummaryBlock . initializeLocal ( ) ; return sharedSummaryBlock ; } }