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);
public BucketAccessor(StorageBucket bucket) { _bucket = bucket; Monitor.Enter(_bucket); }
private StorageBucket.BucketAccessor GetBucket(TableSchema schema) { return((_buckets[schema] ?? (_buckets[schema] = new StorageBucket())).Accessor()); }
private StorageBucket.BucketAccessor GetBucket(OrmSchema schema) { return (_buckets[schema] ?? (_buckets[schema] = new StorageBucket())).Accessor(); }