コード例 #1
0
 internal FabricReplicator(
     NativeRuntime.IFabricReplicator nativeReplicator,
     NativeRuntime.IFabricStateReplicator nativeStateReplicator,
     NativeRuntime.IOperationDataFactory operationDataFactory)
     : this(nativeReplicator)
 {
     this.stateReplicator = FabricReplicator.CreateStateReplicator(nativeStateReplicator, operationDataFactory);
 }
コード例 #2
0
        public StateReplicator(NativeRuntime.IFabricStateReplicator nativeStateReplicator, NativeRuntime.IOperationDataFactory nativeOperationDataFactory)
        {
            Requires.Argument("nativeStateReplicator", nativeStateReplicator).NotNull();
            Requires.Argument("nativeOperationDataFactory", nativeOperationDataFactory).NotNull();

            // This is either the V1 replicator or the service groups atomic group replicator
            this.nativeStateReplicator       = nativeStateReplicator as NativeRuntime.IFabricStateReplicator2;
            this.replicatorUsingOperationEx1 = nativeStateReplicator as NativeRuntime.IFabricInternalManagedReplicator;

            this.operationDataFactory = new OperationDataFactoryWrapper(nativeOperationDataFactory);
        }
コード例 #3
0
        private static StateReplicator CreateStateReplicator(
            NativeRuntime.IFabricStateReplicator nativeStateReplicator,
            NativeRuntime.IOperationDataFactory nativeOperationDataFactory)
        {
            Requires.Argument("nativeOperationDataFactory", nativeOperationDataFactory).NotNull();
            NativeRuntime.IFabricAtomicGroupStateReplicator nativeAtomicGroupStateReplicator = nativeStateReplicator as NativeRuntime.IFabricAtomicGroupStateReplicator;

            if (nativeAtomicGroupStateReplicator != null)
            {
                return(new AtomicGroupStateReplicator(nativeAtomicGroupStateReplicator, nativeStateReplicator, nativeOperationDataFactory));
            }
            else
            {
                return(new StateReplicator(nativeStateReplicator, nativeOperationDataFactory));
            }
        }
コード例 #4
0
        public AtomicGroupStateReplicator(NativeRuntime.IFabricAtomicGroupStateReplicator nativeAtomicGroupStateReplicator, NativeRuntime.IFabricStateReplicator nativeStateReplicator, NativeRuntime.IOperationDataFactory nativeOperationDataFactory)
            : base(nativeStateReplicator, nativeOperationDataFactory)
        {
            Requires.Argument("nativeAtomicGroupStateReplicator", nativeAtomicGroupStateReplicator).NotNull();

            this.nativeAtomicGroupStateReplicator = nativeAtomicGroupStateReplicator;
        }