public static void SetProperty(PswsCmdlet cmdlet, string propertyName, WindowsLiveId propertyValue) { if (propertyValue != null) { cmdlet.Parameters[propertyName] = propertyValue.ToString(); } }
private static bool TryParseWindowsLiveId(string identity, out WindowsLiveId liveId) { liveId = null; if (!identity.Contains("\\")) { return(WindowsLiveId.TryParse(identity, out liveId)); } int num = identity.LastIndexOf('\\'); return(WindowsLiveId.TryParse(identity.Substring(num + 1), out liveId)); }