public override string ToString() { return (((HasStorageClass && StorageClass != StorageClass.None) ? StorageClass.ToString().ToLower() + " " : String.Empty) + Type.ToString() + " " + Name + (HasSemantic ? " : " + Semantic.ToString(false) : String.Empty)); }
public override StringBuilder ToString(StringBuilder sb) { sb.Append(StorageClass.ToString()).Append(' '); if (Type != null) { Type.ToString(sb); } sb.Append('*'); return(sb); }
public async Task CanUploadClassFluid(StorageClass storageClass, bool canDownload) { PutObjectResponse pResp = await UploadTransferAsync(nameof(CanUploadClassFluid) + "-" + storageClass, upload => upload.WithStorageClass(storageClass)).ConfigureAwait(false); Assert.Equal(storageClass, pResp.StorageClass); if (canDownload) { GetObjectResponse gResp = await AssertAsync(storageClass.ToString()).ConfigureAwait(false); Assert.Equal(storageClass, gResp.StorageClass); } }
public async Task CanUploadClass(StorageClass storageClass, bool canDownload) { PutObjectResponse pResp = await UploadAsync(nameof(CanUploadClass) + "-" + storageClass, request => request.StorageClass = storageClass).ConfigureAwait(false); Assert.Equal(storageClass, pResp.StorageClass); if (canDownload) { GetObjectResponse gResp = await AssertAsync(storageClass.ToString()).ConfigureAwait(false); Assert.Equal(storageClass, gResp.StorageClass); } }
public static string GetStorageClassString(StorageClass stC) { var member = typeof(StorageClass).GetMember(stC.ToString()) .FirstOrDefault(); if (member != null) { var att = member.GetCustomAttributes(typeof(KeywordAttribute), false) .Cast<KeywordAttribute>() .FirstOrDefault(); if (att != null) return att.Keyword; } return ""; }
public static string GetStorageClassString(StorageClass stC) { var member = typeof(StorageClass).GetMember(stC.ToString()) .FirstOrDefault(); if (member != null) { var att = member.GetCustomAttributes(typeof(KeywordAttribute), false) .Cast <KeywordAttribute>() .FirstOrDefault(); if (att != null) { return(att.Keyword); } } return(""); }