internal static string GetDisplayName(HttpRequest request, string idParameter) { string text = request.QueryString[idParameter]; string result = string.Empty; bool flag = false; if (!text.IsNullOrBlank()) { Identity identity = Identity.ParseIdentity(text); if (identity != null) { if (string.Compare(identity.DisplayName, identity.RawIdentity) == 0) { identity = identity.ResolveByType(IdentityType.MailboxFolder); } if (identity != null) { result = identity.DisplayName; } } else { flag = true; } } else { flag = true; } if (flag) { throw new BadQueryParameterException(idParameter); } return(result); }
public RuleDetails() : base(HtmlTextWriterTag.Div) { string text = this.Context.Request.QueryString["id"]; if (!string.IsNullOrEmpty(text)) { this.ObjectIdentity = Identity.ParseIdentity(text); } this.ApplyToAllRuleDescription = Strings.RuleDescriptionApplyToAll; }
protected override object GetInternalValue() { object result = null; if (!string.IsNullOrEmpty(base.QueryStringValue)) { result = Identity.ParseIdentity(base.QueryStringValue); } return(result); }
public static MailboxFolderPermissionIdentity ToMailboxFolderPermissionIdentity(this Identity identity) { if (null == identity) { return(null); } string text = HttpUtility.UrlDecode(identity.RawIdentity); Identity[] array = Array.ConvertAll <string, Identity>(text.Split(new char[] { ':' }), (string x) => Identity.ParseIdentity(x)); return(new MailboxFolderPermissionIdentity(array[0], array[1])); }
public PowerShellResults ProcessUpload(UploadFileContext context, WebServiceParameters param) { param.FaultIfNull(); SetUserPhotoParameters setUserPhotoParameters = (SetUserPhotoParameters)param; setUserPhotoParameters.PhotoStream = context.FileStream; Identity identity = Identity.ParseIdentity(setUserPhotoParameters.Identity); if (identity == null || string.IsNullOrEmpty(identity.RawIdentity)) { throw new BadQueryParameterException("Identity"); } return(this.SetPhoto(identity, context.FileStream)); }