Esempio n. 1
0
        Task <EntityStateResponse <T> > IDurableEntityClient.ReadEntityStateAsync <T>(EntityId entityId, string taskHubName, string connectionName)
        {
            if (string.IsNullOrEmpty(taskHubName))
            {
                return(this.ReadEntityStateAsync <T>(this.DurabilityProvider, entityId));
            }
            else
            {
                if (string.IsNullOrEmpty(connectionName))
                {
                    connectionName = this.attribute.ConnectionName;
                }

                var attribute = new DurableClientAttribute
                {
                    TaskHub        = taskHubName,
                    ConnectionName = connectionName,
                };

                DurabilityProvider durabilityProvider = ((DurableClient)this.config.GetClient(attribute)).DurabilityProvider;
                return(this.ReadEntityStateAsync <T>(durabilityProvider, entityId));
            }
        }
Esempio n. 2
0
        public EmulatorDurabilityProviderFactory()
        {
            var service = new LocalOrchestrationService();

            this.provider = new DurabilityProvider("emulator", service, service, "emulator");
        }
 public TaskOrchestrationShim(DurableTaskExtension config, DurabilityProvider durabilityProvider, string name)
     : base(config)
 {
     this.context       = new DurableOrchestrationContext(config, durabilityProvider, name);
     this.outOfProcShim = new OutOfProcOrchestrationShim(this.context);
 }
Esempio n. 4
0
 /// <summary>
 ///  Returns true if the stored connection string, ConnectionName, matches the input DurabilityProvider ConnectionName.
 /// </summary>
 /// <param name="durabilityProvider">The DurabilityProvider used to check for matching connection string names.</param>
 /// <returns>A boolean indicating whether the connection names match.</returns>
 internal virtual bool ConnectionNameMatches(DurabilityProvider durabilityProvider)
 {
     return(this.ConnectionName.Equals(durabilityProvider.ConnectionName));
 }