Candor.WindowsAzure.Storage.Table.CloudTableSequenceIdOptimisticSyncStore.GetSequenceIdStore C# (CSharp) Method

GetSequenceIdStore() public method

Gets the sequence for a given table.
public GetSequenceIdStore ( string tableName ) : SequenceIdStore
tableName string
return Candor.Data.SequenceIdStore
        public SequenceIdStore GetSequenceIdStore(string tableName)
        {
            var schema = SchemaTableProxy.Get(tableName.GetValidPartitionKey(), tableName.GetValidRowKey());
            if (schema == null || schema.Entity == null)
                return null;
            var sequence = SequenceTableProxy.Get(tableName.GetValidPartitionKey(), tableName.GetValidRowKey()) ??
                CreateSequenceFromSchema(tableName);
            return new SequenceIdStore
                {
                    FinalCachedId = sequence.Entity.Properties[PropertyFinalCachedId].StringValue,
                    Schema = schema.Entity
                };
        }