public static string ToDescription(this StorageBucket val)
        {
            DescriptionAttribute[] attributes = (DescriptionAttribute[])val
                                                .GetType()
                                                .GetField(val.ToString())
                                                ?.GetCustomAttributes(typeof(DescriptionAttribute), false);

            return(attributes is { Length : > 0 } ? attributes[0].Description : string.Empty);
Example #2
0
                public BucketAccessor(StorageBucket bucket)
                {
                    _bucket = bucket;

                    Monitor.Enter(_bucket);
                }
Example #3
0
 private StorageBucket.BucketAccessor GetBucket(TableSchema schema)
 {
     return((_buckets[schema] ?? (_buckets[schema] = new StorageBucket())).Accessor());
 }
Example #4
0
                public BucketAccessor(StorageBucket bucket)
                {
                    _bucket = bucket;

                    Monitor.Enter(_bucket);
                }
Example #5
0
 private StorageBucket.BucketAccessor GetBucket(OrmSchema schema)
 {
     return (_buckets[schema] ?? (_buckets[schema] = new StorageBucket())).Accessor();
 }