public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as QueryPaging; if(typedSource != null) { PageNumber = typedSource.PageNumber; PageSize = typedSource.PageSize; Count = typedSource.Count; Skip = typedSource.Skip; } else { JToken token; if(source.TryGetProperty("PageNumber", out token) && token.Type != JTokenType.Null) { PageNumber = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if(source.TryGetProperty("PageSize", out token) && token.Type != JTokenType.Null) { PageSize = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if(source.TryGetProperty("Count", out token) && token.Type != JTokenType.Null) { Count = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if(source.TryGetProperty("Skip", out token) && token.Type != JTokenType.Null) { Skip = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as AccessControlParam; if(typedSource != null) { AccessControl = typedSource.AccessControl; NotifyUser = typedSource.NotifyUser; NotifyMessage = typedSource.NotifyMessage; Recursive = typedSource.Recursive; } else { JToken token; if(source.TryGetProperty("AccessControl", out token) && token.Type != JTokenType.Null) { AccessControl = (AccessControl)serializer.Deserialize(token.CreateReader(), typeof(AccessControl)); } if(source.TryGetProperty("NotifyUser", out token) && token.Type != JTokenType.Null) { NotifyUser = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("NotifyMessage", out token) && token.Type != JTokenType.Null) { NotifyMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Recursive", out token) && token.Type != JTokenType.Null) { Recursive = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as Metadata; if(typedSource != null) { Name = typedSource.Name; Value = typedSource.Value; IsPublic = typedSource.IsPublic; } else { JToken token; if(source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Value", out token) && token.Type != JTokenType.Null) { Value = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("IsPublic", out token) && token.Type != JTokenType.Null) { IsPublic = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as AccountZoneUsage; if(typedSource != null) { TotalFileSizeBytes = typedSource.TotalFileSizeBytes; Zone = typedSource.Zone; RootFolderCount = typedSource.RootFolderCount; FileCount = typedSource.FileCount; } else { JToken token; if(source.TryGetProperty("TotalFileSizeBytes", out token) && token.Type != JTokenType.Null) { TotalFileSizeBytes = (long?)serializer.Deserialize(token.CreateReader(), typeof(long?)); } if(source.TryGetProperty("Zone", out token) && token.Type != JTokenType.Null) { Zone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if(source.TryGetProperty("RootFolderCount", out token) && token.Type != JTokenType.Null) { RootFolderCount = (long?)serializer.Deserialize(token.CreateReader(), typeof(long?)); } if(source.TryGetProperty("FileCount", out token) && token.Type != JTokenType.Null) { FileCount = (long?)serializer.Deserialize(token.CreateReader(), typeof(long?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as FolderTemplateItem; if(typedSource != null) { Name = typedSource.Name; Description = typedSource.Description; Items = typedSource.Items; } else { JToken token; if(source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Description", out token) && token.Type != JTokenType.Null) { Description = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Items", out token) && token.Type != JTokenType.Null) { Items = (IEnumerable<FolderTemplateItem>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable<FolderTemplateItem>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as AdvancedSearchResults; if(typedSource != null) { PartialResults = typedSource.PartialResults; Results = typedSource.Results; TimedOut = typedSource.TimedOut; } else { JToken token; if(source.TryGetProperty("PartialResults", out token) && token.Type != JTokenType.Null) { PartialResults = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("Results", out token) && token.Type != JTokenType.Null) { Results = (IEnumerable<SearchResult>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable<SearchResult>)); } if(source.TryGetProperty("TimedOut", out token) && token.Type != JTokenType.Null) { TimedOut = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as FileLock; if(typedSource != null) { LockId = typedSource.LockId; LockType = typedSource.LockType; Owner = typedSource.Owner; ExpirationTimeInMinutes = typedSource.ExpirationTimeInMinutes; } else { JToken token; if(source.TryGetProperty("LockId", out token) && token.Type != JTokenType.Null) { LockId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("LockType", out token) && token.Type != JTokenType.Null) { LockType = (SafeEnum<LockType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum<LockType>)); } if(source.TryGetProperty("Owner", out token) && token.Type != JTokenType.Null) { Owner = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if(source.TryGetProperty("ExpirationTimeInMinutes", out token) && token.Type != JTokenType.Null) { ExpirationTimeInMinutes = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as AccessControlFailedEntry; if(typedSource != null) { AccessControl = typedSource.AccessControl; Code = typedSource.Code; Message = typedSource.Message; } else { JToken token; if(source.TryGetProperty("AccessControl", out token) && token.Type != JTokenType.Null) { AccessControl = (AccessControl)serializer.Deserialize(token.CreateReader(), typeof(AccessControl)); } if(source.TryGetProperty("Code", out token) && token.Type != JTokenType.Null) { Code = (SafeEnum<HttpStatusCode>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum<HttpStatusCode>)); } if(source.TryGetProperty("Message", out token) && token.Type != JTokenType.Null) { Message = (ODataExceptionMessage)serializer.Deserialize(token.CreateReader(), typeof(ODataExceptionMessage)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as SearchQuery; if(typedSource != null) { Query = typedSource.Query; Paging = typedSource.Paging; Sort = typedSource.Sort; TimeoutInSeconds = typedSource.TimeoutInSeconds; } else { JToken token; if(source.TryGetProperty("Query", out token) && token.Type != JTokenType.Null) { Query = (Query)serializer.Deserialize(token.CreateReader(), typeof(Query)); } if(source.TryGetProperty("Paging", out token) && token.Type != JTokenType.Null) { Paging = (QueryPaging)serializer.Deserialize(token.CreateReader(), typeof(QueryPaging)); } if(source.TryGetProperty("Sort", out token) && token.Type != JTokenType.Null) { Sort = (QuerySorting)serializer.Deserialize(token.CreateReader(), typeof(QuerySorting)); } if(source.TryGetProperty("TimeoutInSeconds", out token) && token.Type != JTokenType.Null) { TimeoutInSeconds = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as DiskSpace; if(typedSource != null) { Max = typedSource.Max; Used = typedSource.Used; Free = typedSource.Free; } else { JToken token; if(source.TryGetProperty("Max", out token) && token.Type != JTokenType.Null) { Max = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if(source.TryGetProperty("Used", out token) && token.Type != JTokenType.Null) { Used = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if(source.TryGetProperty("Free", out token) && token.Type != JTokenType.Null) { Free = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as FindSubdomainParams; if(typedSource != null) { UsernameShort = typedSource.UsernameShort; Password = typedSource.Password; EmployeeOnly = typedSource.EmployeeOnly; } else { JToken token; if(source.TryGetProperty("UsernameShort", out token) && token.Type != JTokenType.Null) { UsernameShort = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Password", out token) && token.Type != JTokenType.Null) { Password = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("EmployeeOnly", out token) && token.Type != JTokenType.Null) { EmployeeOnly = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as DeviceUserWipe; if(typedSource != null) { WipeToken = typedSource.WipeToken; Success = typedSource.Success; ErrorMessage = typedSource.ErrorMessage; } else { JToken token; if(source.TryGetProperty("WipeToken", out token) && token.Type != JTokenType.Null) { WipeToken = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Success", out token) && token.Type != JTokenType.Null) { Success = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("ErrorMessage", out token) && token.Type != JTokenType.Null) { ErrorMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as SSOInfo; if(typedSource != null) { Info = typedSource.Info; AppControlPlane = typedSource.AppControlPlane; ApiControlPlane = typedSource.ApiControlPlane; } else { JToken token; if(source.TryGetProperty("Info", out token) && token.Type != JTokenType.Null) { Info = (IEnumerable<SSOInfoEntry>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable<SSOInfoEntry>)); } if(source.TryGetProperty("AppControlPlane", out token) && token.Type != JTokenType.Null) { AppControlPlane = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("ApiControlPlane", out token) && token.Type != JTokenType.Null) { ApiControlPlane = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as UserUsage; if(typedSource != null) { EmployeeMax = typedSource.EmployeeMax; EmployeeCount = typedSource.EmployeeCount; ClientCount = typedSource.ClientCount; } else { JToken token; if(source.TryGetProperty("EmployeeMax", out token) && token.Type != JTokenType.Null) { EmployeeMax = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if(source.TryGetProperty("EmployeeCount", out token) && token.Type != JTokenType.Null) { EmployeeCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if(source.TryGetProperty("ClientCount", out token) && token.Type != JTokenType.Null) { ClientCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as ConnectorGroupAccessControl; if(typedSource != null) { Principal = typedSource.Principal; CanManage = typedSource.CanManage; CanCreate = typedSource.CanCreate; } else { JToken token; if(source.TryGetProperty("Principal", out token) && token.Type != JTokenType.Null) { Principal = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if(source.TryGetProperty("CanManage", out token) && token.Type != JTokenType.Null) { CanManage = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("CanCreate", out token) && token.Type != JTokenType.Null) { CanCreate = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as PowerTools; if(typedSource != null) { EnableDesktopToolsPage = typedSource.EnableDesktopToolsPage; EnableMobileApps = typedSource.EnableMobileApps; ShowMobileTools = typedSource.ShowMobileTools; } else { JToken token; if(source.TryGetProperty("EnableDesktopToolsPage", out token) && token.Type != JTokenType.Null) { EnableDesktopToolsPage = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("EnableMobileApps", out token) && token.Type != JTokenType.Null) { EnableMobileApps = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("ShowMobileTools", out token) && token.Type != JTokenType.Null) { ShowMobileTools = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as DownloadSpecification; if(typedSource != null) { DownloadToken = typedSource.DownloadToken; PrepareXmlInfo = typedSource.PrepareXmlInfo; DownloadUrl = typedSource.DownloadUrl; DownloadPrepStartURL = typedSource.DownloadPrepStartURL; } else { JToken token; if(source.TryGetProperty("DownloadToken", out token) && token.Type != JTokenType.Null) { DownloadToken = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("PrepareXmlInfo", out token) && token.Type != JTokenType.Null) { PrepareXmlInfo = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("DownloadUrl", out token) && token.Type != JTokenType.Null) { DownloadUrl = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if(source.TryGetProperty("DownloadPrepStartURL", out token) && token.Type != JTokenType.Null) { DownloadPrepStartURL = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as ShareItemHistory; if(typedSource != null) { Title = typedSource.Title; Recipient = typedSource.Recipient; ActivityType = typedSource.ActivityType; DownloadDate = typedSource.DownloadDate; } else { JToken token; if(source.TryGetProperty("Title", out token) && token.Type != JTokenType.Null) { Title = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Recipient", out token) && token.Type != JTokenType.Null) { Recipient = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("ActivityType", out token) && token.Type != JTokenType.Null) { ActivityType = (SafeEnum<ItemAction>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum<ItemAction>)); } if(source.TryGetProperty("DownloadDate", out token) && token.Type != JTokenType.Null) { DownloadDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as MarketAnalytics; if(typedSource != null) { ConversionIndex = typedSource.ConversionIndex; ConversionIndex2 = typedSource.ConversionIndex2; LtvIndex = typedSource.LtvIndex; PlanValue = typedSource.PlanValue; } else { JToken token; if(source.TryGetProperty("ConversionIndex", out token) && token.Type != JTokenType.Null) { ConversionIndex = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if(source.TryGetProperty("ConversionIndex2", out token) && token.Type != JTokenType.Null) { ConversionIndex2 = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if(source.TryGetProperty("LtvIndex", out token) && token.Type != JTokenType.Null) { LtvIndex = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if(source.TryGetProperty("PlanValue", out token) && token.Type != JTokenType.Null) { PlanValue = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as Principal; if(typedSource != null) { Name = typedSource.Name; Email = typedSource.Email; Username = typedSource.Username; Domain = typedSource.Domain; } else { JToken token; if(source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Email", out token) && token.Type != JTokenType.Null) { Email = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Username", out token) && token.Type != JTokenType.Null) { Username = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Domain", out token) && token.Type != JTokenType.Null) { Domain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as Group; if(typedSource != null) { Owner = typedSource.Owner; Account = typedSource.Account; IsShared = typedSource.IsShared; Contacts = typedSource.Contacts; } else { JToken token; if(source.TryGetProperty("Owner", out token) && token.Type != JTokenType.Null) { Owner = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if(source.TryGetProperty("Account", out token) && token.Type != JTokenType.Null) { Account = (Account)serializer.Deserialize(token.CreateReader(), typeof(Account)); } if(source.TryGetProperty("IsShared", out token) && token.Type != JTokenType.Null) { IsShared = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("Contacts", out token) && token.Type != JTokenType.Null) { Contacts = (IEnumerable<Contact>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable<Contact>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as AccessControlsBulkParams; if(typedSource != null) { NotifyUser = typedSource.NotifyUser; NotifyMessage = typedSource.NotifyMessage; AccessControlParams = typedSource.AccessControlParams; } else { JToken token; if(source.TryGetProperty("NotifyUser", out token) && token.Type != JTokenType.Null) { NotifyUser = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("NotifyMessage", out token) && token.Type != JTokenType.Null) { NotifyMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("AccessControlParams", out token) && token.Type != JTokenType.Null) { AccessControlParams = (IEnumerable<AccessControlParam>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable<AccessControlParam>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as UserConfirmationSettings; if(typedSource != null) { FirstName = typedSource.FirstName; LastName = typedSource.LastName; Company = typedSource.Company; Password = typedSource.Password; DayLightName = typedSource.DayLightName; UTCOffset = typedSource.UTCOffset; DateFormat = typedSource.DateFormat; TimeFormat = typedSource.TimeFormat; EmailInterval = typedSource.EmailInterval; } else { JToken token; if(source.TryGetProperty("FirstName", out token) && token.Type != JTokenType.Null) { FirstName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("LastName", out token) && token.Type != JTokenType.Null) { LastName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Company", out token) && token.Type != JTokenType.Null) { Company = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Password", out token) && token.Type != JTokenType.Null) { Password = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("DayLightName", out token) && token.Type != JTokenType.Null) { DayLightName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("UTCOffset", out token) && token.Type != JTokenType.Null) { UTCOffset = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("DateFormat", out token) && token.Type != JTokenType.Null) { DateFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("TimeFormat", out token) && token.Type != JTokenType.Null) { TimeFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("EmailInterval", out token) && token.Type != JTokenType.Null) { EmailInterval = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as Session; if(typedSource != null) { Principal = typedSource.Principal; AuthenticationType = typedSource.AuthenticationType; OAuth2ClientName = typedSource.OAuth2ClientName; Tool = typedSource.Tool; Version = typedSource.Version; ClientIPAddress = typedSource.ClientIPAddress; IsAuthenticated = typedSource.IsAuthenticated; Name = typedSource.Name; DeviceUser = typedSource.DeviceUser; } else { JToken token; if(source.TryGetProperty("Principal", out token) && token.Type != JTokenType.Null) { Principal = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if(source.TryGetProperty("AuthenticationType", out token) && token.Type != JTokenType.Null) { AuthenticationType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("OAuth2ClientName", out token) && token.Type != JTokenType.Null) { OAuth2ClientName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Tool", out token) && token.Type != JTokenType.Null) { Tool = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Version", out token) && token.Type != JTokenType.Null) { Version = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("ClientIPAddress", out token) && token.Type != JTokenType.Null) { ClientIPAddress = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("IsAuthenticated", out token) && token.Type != JTokenType.Null) { IsAuthenticated = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("DeviceUser", out token) && token.Type != JTokenType.Null) { DeviceUser = (DeviceUser)serializer.Deserialize(token.CreateReader(), typeof(DeviceUser)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as UploadSpecification; if(typedSource != null) { Method = typedSource.Method; PrepareUri = typedSource.PrepareUri; ChunkUri = typedSource.ChunkUri; FinishUri = typedSource.FinishUri; ProgressData = typedSource.ProgressData; IsResume = typedSource.IsResume; ResumeIndex = typedSource.ResumeIndex; ResumeOffset = typedSource.ResumeOffset; ResumeFileHash = typedSource.ResumeFileHash; } else { JToken token; if(source.TryGetProperty("Method", out token) && token.Type != JTokenType.Null) { Method = (SafeEnum<UploadMethod>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum<UploadMethod>)); } if(source.TryGetProperty("PrepareUri", out token) && token.Type != JTokenType.Null) { PrepareUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if(source.TryGetProperty("ChunkUri", out token) && token.Type != JTokenType.Null) { ChunkUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if(source.TryGetProperty("FinishUri", out token) && token.Type != JTokenType.Null) { FinishUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if(source.TryGetProperty("ProgressData", out token) && token.Type != JTokenType.Null) { ProgressData = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("IsResume", out token) && token.Type != JTokenType.Null) { IsResume = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("ResumeIndex", out token) && token.Type != JTokenType.Null) { ResumeIndex = (long)serializer.Deserialize(token.CreateReader(), typeof(long)); } if(source.TryGetProperty("ResumeOffset", out token) && token.Type != JTokenType.Null) { ResumeOffset = (long)serializer.Deserialize(token.CreateReader(), typeof(long)); } if(source.TryGetProperty("ResumeFileHash", out token) && token.Type != JTokenType.Null) { ResumeFileHash = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public virtual void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; var typedSource = source as ODataObject; MetadataUrl = typedSource.MetadataUrl; __type = typedSource.__type; Id = typedSource.Id; url = typedSource.url; }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as ReportRecord; if(typedSource != null) { Report = typedSource.Report; StartDate = typedSource.StartDate; EndDate = typedSource.EndDate; StartRunTime = typedSource.StartRunTime; EndRunTime = typedSource.EndRunTime; Status = typedSource.Status; HasData = typedSource.HasData; Message = typedSource.Message; } else { JToken token; if(source.TryGetProperty("Report", out token) && token.Type != JTokenType.Null) { Report = (Report)serializer.Deserialize(token.CreateReader(), typeof(Report)); } if(source.TryGetProperty("StartDate", out token) && token.Type != JTokenType.Null) { StartDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if(source.TryGetProperty("EndDate", out token) && token.Type != JTokenType.Null) { EndDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if(source.TryGetProperty("StartRunTime", out token) && token.Type != JTokenType.Null) { StartRunTime = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if(source.TryGetProperty("EndRunTime", out token) && token.Type != JTokenType.Null) { EndRunTime = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if(source.TryGetProperty("Status", out token) && token.Type != JTokenType.Null) { Status = (SafeEnum<ReportRunStatus>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum<ReportRunStatus>)); } if(source.TryGetProperty("HasData", out token) && token.Type != JTokenType.Null) { HasData = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("Message", out token) && token.Type != JTokenType.Null) { Message = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as EnsSubscriberConfiguration; if(typedSource != null) { IsEnsEnabled = typedSource.IsEnsEnabled; EnsServerUrl = typedSource.EnsServerUrl; Version = typedSource.Version; RecommendedPollingSyncInterval = typedSource.RecommendedPollingSyncInterval; RecommendedNotificationSyncInterval = typedSource.RecommendedNotificationSyncInterval; NotificationConfigurationCount = typedSource.NotificationConfigurationCount; FailSafePollingCount = typedSource.FailSafePollingCount; MaxNotificationSyncWaitCount = typedSource.MaxNotificationSyncWaitCount; } else { JToken token; if(source.TryGetProperty("IsEnsEnabled", out token) && token.Type != JTokenType.Null) { IsEnsEnabled = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if(source.TryGetProperty("EnsServerUrl", out token) && token.Type != JTokenType.Null) { EnsServerUrl = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Version", out token) && token.Type != JTokenType.Null) { Version = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("RecommendedPollingSyncInterval", out token) && token.Type != JTokenType.Null) { RecommendedPollingSyncInterval = (TimeSpan)serializer.Deserialize(token.CreateReader(), typeof(TimeSpan)); } if(source.TryGetProperty("RecommendedNotificationSyncInterval", out token) && token.Type != JTokenType.Null) { RecommendedNotificationSyncInterval = (TimeSpan)serializer.Deserialize(token.CreateReader(), typeof(TimeSpan)); } if(source.TryGetProperty("NotificationConfigurationCount", out token) && token.Type != JTokenType.Null) { NotificationConfigurationCount = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if(source.TryGetProperty("FailSafePollingCount", out token) && token.Type != JTokenType.Null) { FailSafePollingCount = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if(source.TryGetProperty("MaxNotificationSyncWaitCount", out token) && token.Type != JTokenType.Null) { MaxNotificationSyncWaitCount = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as ShareAlias; if(typedSource != null) { User = typedSource.User; Share = typedSource.Share; Email = typedSource.Email; Downloads = typedSource.Downloads; IsConsumed = typedSource.IsConsumed; IsArchived = typedSource.IsArchived; IsRead = typedSource.IsRead; Uri = typedSource.Uri; } else { JToken token; if(source.TryGetProperty("User", out token) && token.Type != JTokenType.Null) { User = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if(source.TryGetProperty("Share", out token) && token.Type != JTokenType.Null) { Share = (Share)serializer.Deserialize(token.CreateReader(), typeof(Share)); } if(source.TryGetProperty("Email", out token) && token.Type != JTokenType.Null) { Email = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Downloads", out token) && token.Type != JTokenType.Null) { Downloads = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if(source.TryGetProperty("IsConsumed", out token) && token.Type != JTokenType.Null) { IsConsumed = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("IsArchived", out token) && token.Type != JTokenType.Null) { IsArchived = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("IsRead", out token) && token.Type != JTokenType.Null) { IsRead = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("Uri", out token) && token.Type != JTokenType.Null) { Uri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if(source == null || serializer == null) return; base.Copy(source, serializer); var typedSource = source as Contact; if(typedSource != null) { User = typedSource.User; FirstName = typedSource.FirstName; LastName = typedSource.LastName; Company = typedSource.Company; EmailMedium = typedSource.EmailMedium; EmailShort = typedSource.EmailShort; IsConfirmed = typedSource.IsConfirmed; Count = typedSource.Count; } else { JToken token; if(source.TryGetProperty("User", out token) && token.Type != JTokenType.Null) { User = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if(source.TryGetProperty("FirstName", out token) && token.Type != JTokenType.Null) { FirstName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("LastName", out token) && token.Type != JTokenType.Null) { LastName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("Company", out token) && token.Type != JTokenType.Null) { Company = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("EmailMedium", out token) && token.Type != JTokenType.Null) { EmailMedium = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("EmailShort", out token) && token.Type != JTokenType.Null) { EmailShort = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if(source.TryGetProperty("IsConfirmed", out token) && token.Type != JTokenType.Null) { IsConfirmed = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if(source.TryGetProperty("Count", out token) && token.Type != JTokenType.Null) { Count = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as FindSubdomainResult; if (typedSource != null) { UserID = typedSource.UserID; Email = typedSource.Email; AccountID = typedSource.AccountID; CompanyName = typedSource.CompanyName; Subdomain = typedSource.Subdomain; } else { JToken token; if (source.TryGetProperty("UserID", out token) && token.Type != JTokenType.Null) { UserID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Email", out token) && token.Type != JTokenType.Null) { Email = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AccountID", out token) && token.Type != JTokenType.Null) { AccountID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CompanyName", out token) && token.Type != JTokenType.Null) { CompanyName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Subdomain", out token) && token.Type != JTokenType.Null) { Subdomain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Group; if (typedSource != null) { Owner = typedSource.Owner; Account = typedSource.Account; IsShared = typedSource.IsShared; Contacts = typedSource.Contacts; } else { JToken token; if (source.TryGetProperty("Owner", out token) && token.Type != JTokenType.Null) { Owner = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("Account", out token) && token.Type != JTokenType.Null) { Account = (Account)serializer.Deserialize(token.CreateReader(), typeof(Account)); } if (source.TryGetProperty("IsShared", out token) && token.Type != JTokenType.Null) { IsShared = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Contacts", out token) && token.Type != JTokenType.Null) { Contacts = (IEnumerable <Contact>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <Contact>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as FileLock; if (typedSource != null) { LockId = typedSource.LockId; LockType = typedSource.LockType; Owner = typedSource.Owner; ExpirationTimeInMinutes = typedSource.ExpirationTimeInMinutes; } else { JToken token; if (source.TryGetProperty("LockId", out token) && token.Type != JTokenType.Null) { LockId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LockType", out token) && token.Type != JTokenType.Null) { LockType = (SafeEnum <LockType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <LockType>)); } if (source.TryGetProperty("Owner", out token) && token.Type != JTokenType.Null) { Owner = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if (source.TryGetProperty("ExpirationTimeInMinutes", out token) && token.Type != JTokenType.Null) { ExpirationTimeInMinutes = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as MarketAnalytics; if (typedSource != null) { ConversionIndex = typedSource.ConversionIndex; ConversionIndex2 = typedSource.ConversionIndex2; LtvIndex = typedSource.LtvIndex; PlanValue = typedSource.PlanValue; } else { JToken token; if (source.TryGetProperty("ConversionIndex", out token) && token.Type != JTokenType.Null) { ConversionIndex = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("ConversionIndex2", out token) && token.Type != JTokenType.Null) { ConversionIndex2 = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("LtvIndex", out token) && token.Type != JTokenType.Null) { LtvIndex = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("PlanValue", out token) && token.Type != JTokenType.Null) { PlanValue = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SimpleSearchQuery; if (typedSource != null) { Query = typedSource.Query; Paging = typedSource.Paging; Sort = typedSource.Sort; TimeoutInSeconds = typedSource.TimeoutInSeconds; } else { JToken token; if (source.TryGetProperty("Query", out token) && token.Type != JTokenType.Null) { Query = (SimpleQuery)serializer.Deserialize(token.CreateReader(), typeof(SimpleQuery)); } if (source.TryGetProperty("Paging", out token) && token.Type != JTokenType.Null) { Paging = (QueryPaging)serializer.Deserialize(token.CreateReader(), typeof(QueryPaging)); } if (source.TryGetProperty("Sort", out token) && token.Type != JTokenType.Null) { Sort = (QuerySorting)serializer.Deserialize(token.CreateReader(), typeof(QuerySorting)); } if (source.TryGetProperty("TimeoutInSeconds", out token) && token.Type != JTokenType.Null) { TimeoutInSeconds = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as FolderTemplate; if (typedSource != null) { Name = typedSource.Name; Description = typedSource.Description; Creator = typedSource.Creator; Items = typedSource.Items; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Description", out token) && token.Type != JTokenType.Null) { Description = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Creator", out token) && token.Type != JTokenType.Null) { Creator = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("Items", out token) && token.Type != JTokenType.Null) { Items = (IEnumerable <FolderTemplateItem>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <FolderTemplateItem>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Principal; if (typedSource != null) { Name = typedSource.Name; Email = typedSource.Email; Username = typedSource.Username; Domain = typedSource.Domain; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Email", out token) && token.Type != JTokenType.Null) { Email = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Username", out token) && token.Type != JTokenType.Null) { Username = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Domain", out token) && token.Type != JTokenType.Null) { Domain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as DownloadSpecification; if (typedSource != null) { DownloadToken = typedSource.DownloadToken; PrepareXmlInfo = typedSource.PrepareXmlInfo; DownloadUrl = typedSource.DownloadUrl; DownloadPrepStartURL = typedSource.DownloadPrepStartURL; } else { JToken token; if (source.TryGetProperty("DownloadToken", out token) && token.Type != JTokenType.Null) { DownloadToken = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PrepareXmlInfo", out token) && token.Type != JTokenType.Null) { PrepareXmlInfo = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DownloadUrl", out token) && token.Type != JTokenType.Null) { DownloadUrl = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("DownloadPrepStartURL", out token) && token.Type != JTokenType.Null) { DownloadPrepStartURL = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as QueryPaging; if (typedSource != null) { PageNumber = typedSource.PageNumber; PageSize = typedSource.PageSize; Count = typedSource.Count; Skip = typedSource.Skip; } else { JToken token; if (source.TryGetProperty("PageNumber", out token) && token.Type != JTokenType.Null) { PageNumber = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("PageSize", out token) && token.Type != JTokenType.Null) { PageSize = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("Count", out token) && token.Type != JTokenType.Null) { Count = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("Skip", out token) && token.Type != JTokenType.Null) { Skip = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccessControlParam; if (typedSource != null) { AccessControl = typedSource.AccessControl; NotifyUser = typedSource.NotifyUser; NotifyMessage = typedSource.NotifyMessage; Recursive = typedSource.Recursive; } else { JToken token; if (source.TryGetProperty("AccessControl", out token) && token.Type != JTokenType.Null) { AccessControl = (AccessControl)serializer.Deserialize(token.CreateReader(), typeof(AccessControl)); } if (source.TryGetProperty("NotifyUser", out token) && token.Type != JTokenType.Null) { NotifyUser = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyMessage", out token) && token.Type != JTokenType.Null) { NotifyMessage = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Recursive", out token) && token.Type != JTokenType.Null) { Recursive = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Link; if (typedSource != null) { Uri = typedSource.Uri; } else { JToken token; if (source.TryGetProperty("Uri", out token) && token.Type != JTokenType.Null) { Uri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as RequireSubdomainResult; if (typedSource != null) { RequireSubdomain = typedSource.RequireSubdomain; } else { JToken token; if (source.TryGetProperty("RequireSubdomain", out token) && token.Type != JTokenType.Null) { RequireSubdomain = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Industry; if (typedSource != null) { Name = typedSource.Name; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Account; if (typedSource != null) { CompanyName = typedSource.CompanyName; BillingContact = typedSource.BillingContact; BillingContactId = typedSource.BillingContactId; TechnicalContact = typedSource.TechnicalContact; TechnicalContactId = typedSource.TechnicalContactId; AccountManager = typedSource.AccountManager; AccountManagerId = typedSource.AccountManagerId; AccountType = typedSource.AccountType; PlanName = typedSource.PlanName; PlanTrack = typedSource.PlanTrack; PlanTrackEnum = typedSource.PlanTrackEnum; BillingType = typedSource.BillingType; BillingCycle = typedSource.BillingCycle; BillingRate = typedSource.BillingRate; BaseBillingRate = typedSource.BaseBillingRate; BaseBandwidth = typedSource.BaseBandwidth; BaseDiskSpace = typedSource.BaseDiskSpace; BaseUsers = typedSource.BaseUsers; AdditionalBandwidth = typedSource.AdditionalBandwidth; AdditionalDiskSpace = typedSource.AdditionalDiskSpace; AdditionalUsers = typedSource.AdditionalUsers; AdditionalBandwidthRate = typedSource.AdditionalBandwidthRate; AdditionalDiskSpaceRate = typedSource.AdditionalDiskSpaceRate; AdditionalUserRate = typedSource.AdditionalUserRate; UserMax = typedSource.UserMax; UserUsage = typedSource.UserUsage; DiskSpaceMax = typedSource.DiskSpaceMax; DiskSpace = typedSource.DiskSpace; BandwidthMax = typedSource.BandwidthMax; HasPowerTools = typedSource.HasPowerTools; HasEncryption = typedSource.HasEncryption; PowerToolsRate = typedSource.PowerToolsRate; EncryptionRate = typedSource.EncryptionRate; Address1 = typedSource.Address1; Address2 = typedSource.Address2; City = typedSource.City; State = typedSource.State; Zip = typedSource.Zip; Country = typedSource.Country; CreditCardType = typedSource.CreditCardType; CreditCardNumber = typedSource.CreditCardNumber; CreditCardExpirationMonth = typedSource.CreditCardExpirationMonth; CreditCardExpirationYear = typedSource.CreditCardExpirationYear; CreditCardFirstName = typedSource.CreditCardFirstName; CreditCardLastName = typedSource.CreditCardLastName; Phone = typedSource.Phone; LastBillingDate = typedSource.LastBillingDate; NextBillingDate = typedSource.NextBillingDate; UseAdvancedCustomBranding = typedSource.UseAdvancedCustomBranding; AdvancedCustomBrandingFolderName = typedSource.AdvancedCustomBrandingFolderName; BrandingStyles = typedSource.BrandingStyles; LogoURL = typedSource.LogoURL; RootItem = typedSource.RootItem; RootItemId = typedSource.RootItemId; CreationDate = typedSource.CreationDate; IsFreeTrial = typedSource.IsFreeTrial; IsCancelled = typedSource.IsCancelled; CancellationDate = typedSource.CancellationDate; SSO = typedSource.SSO; Preferences = typedSource.Preferences; ProductDefaults = typedSource.ProductDefaults; Subdomain = typedSource.Subdomain; Subdomains = typedSource.Subdomains; MobileSecuritySettings = typedSource.MobileSecuritySettings; LoginAccessControlDomains = typedSource.LoginAccessControlDomains; FolderAccessControlDomains = typedSource.FolderAccessControlDomains; StorageQuotaPerUser = typedSource.StorageQuotaPerUser; FreeTrialId = typedSource.FreeTrialId; Source = typedSource.Source; AttributedSource = typedSource.AttributedSource; CompanyURL = typedSource.CompanyURL; MarketingOptIn = typedSource.MarketingOptIn; CreditCardSecurityCode = typedSource.CreditCardSecurityCode; ToolInformation = typedSource.ToolInformation; BillingInformation = typedSource.BillingInformation; } else { JToken token; if (source.TryGetProperty("CompanyName", out token) && token.Type != JTokenType.Null) { CompanyName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BillingContact", out token) && token.Type != JTokenType.Null) { BillingContact = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("BillingContactId", out token) && token.Type != JTokenType.Null) { BillingContactId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("TechnicalContact", out token) && token.Type != JTokenType.Null) { TechnicalContact = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("TechnicalContactId", out token) && token.Type != JTokenType.Null) { TechnicalContactId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AccountManager", out token) && token.Type != JTokenType.Null) { AccountManager = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("AccountManagerId", out token) && token.Type != JTokenType.Null) { AccountManagerId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AccountType", out token) && token.Type != JTokenType.Null) { AccountType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PlanName", out token) && token.Type != JTokenType.Null) { PlanName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PlanTrack", out token) && token.Type != JTokenType.Null) { PlanTrack = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PlanTrackEnum", out token) && token.Type != JTokenType.Null) { PlanTrackEnum = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BillingType", out token) && token.Type != JTokenType.Null) { BillingType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BillingCycle", out token) && token.Type != JTokenType.Null) { BillingCycle = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BillingRate", out token) && token.Type != JTokenType.Null) { BillingRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("BaseBillingRate", out token) && token.Type != JTokenType.Null) { BaseBillingRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("BaseBandwidth", out token) && token.Type != JTokenType.Null) { BaseBandwidth = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("BaseDiskSpace", out token) && token.Type != JTokenType.Null) { BaseDiskSpace = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("BaseUsers", out token) && token.Type != JTokenType.Null) { BaseUsers = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("AdditionalBandwidth", out token) && token.Type != JTokenType.Null) { AdditionalBandwidth = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("AdditionalDiskSpace", out token) && token.Type != JTokenType.Null) { AdditionalDiskSpace = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("AdditionalUsers", out token) && token.Type != JTokenType.Null) { AdditionalUsers = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("AdditionalBandwidthRate", out token) && token.Type != JTokenType.Null) { AdditionalBandwidthRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("AdditionalDiskSpaceRate", out token) && token.Type != JTokenType.Null) { AdditionalDiskSpaceRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("AdditionalUserRate", out token) && token.Type != JTokenType.Null) { AdditionalUserRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("UserMax", out token) && token.Type != JTokenType.Null) { UserMax = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("UserUsage", out token) && token.Type != JTokenType.Null) { UserUsage = (UserUsage)serializer.Deserialize(token.CreateReader(), typeof(UserUsage)); } if (source.TryGetProperty("DiskSpaceMax", out token) && token.Type != JTokenType.Null) { DiskSpaceMax = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("DiskSpace", out token) && token.Type != JTokenType.Null) { DiskSpace = (DiskSpace)serializer.Deserialize(token.CreateReader(), typeof(DiskSpace)); } if (source.TryGetProperty("BandwidthMax", out token) && token.Type != JTokenType.Null) { BandwidthMax = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("HasPowerTools", out token) && token.Type != JTokenType.Null) { HasPowerTools = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("HasEncryption", out token) && token.Type != JTokenType.Null) { HasEncryption = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("PowerToolsRate", out token) && token.Type != JTokenType.Null) { PowerToolsRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("EncryptionRate", out token) && token.Type != JTokenType.Null) { EncryptionRate = (decimal?)serializer.Deserialize(token.CreateReader(), typeof(decimal?)); } if (source.TryGetProperty("Address1", out token) && token.Type != JTokenType.Null) { Address1 = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Address2", out token) && token.Type != JTokenType.Null) { Address2 = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("City", out token) && token.Type != JTokenType.Null) { City = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("State", out token) && token.Type != JTokenType.Null) { State = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Zip", out token) && token.Type != JTokenType.Null) { Zip = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Country", out token) && token.Type != JTokenType.Null) { Country = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardType", out token) && token.Type != JTokenType.Null) { CreditCardType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardNumber", out token) && token.Type != JTokenType.Null) { CreditCardNumber = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardExpirationMonth", out token) && token.Type != JTokenType.Null) { CreditCardExpirationMonth = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardExpirationYear", out token) && token.Type != JTokenType.Null) { CreditCardExpirationYear = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardFirstName", out token) && token.Type != JTokenType.Null) { CreditCardFirstName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreditCardLastName", out token) && token.Type != JTokenType.Null) { CreditCardLastName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Phone", out token) && token.Type != JTokenType.Null) { Phone = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LastBillingDate", out token) && token.Type != JTokenType.Null) { LastBillingDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("NextBillingDate", out token) && token.Type != JTokenType.Null) { NextBillingDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("UseAdvancedCustomBranding", out token) && token.Type != JTokenType.Null) { UseAdvancedCustomBranding = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("AdvancedCustomBrandingFolderName", out token) && token.Type != JTokenType.Null) { AdvancedCustomBrandingFolderName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BrandingStyles", out token) && token.Type != JTokenType.Null) { BrandingStyles = (IDictionary <string, string>)serializer.Deserialize(token.CreateReader(), typeof(IDictionary <string, string>)); } if (source.TryGetProperty("LogoURL", out token) && token.Type != JTokenType.Null) { LogoURL = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("RootItem", out token) && token.Type != JTokenType.Null) { RootItem = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("RootItemId", out token) && token.Type != JTokenType.Null) { RootItemId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreationDate", out token) && token.Type != JTokenType.Null) { CreationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("IsFreeTrial", out token) && token.Type != JTokenType.Null) { IsFreeTrial = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsCancelled", out token) && token.Type != JTokenType.Null) { IsCancelled = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CancellationDate", out token) && token.Type != JTokenType.Null) { CancellationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("SSO", out token) && token.Type != JTokenType.Null) { SSO = (SSOAccountProvider)serializer.Deserialize(token.CreateReader(), typeof(SSOAccountProvider)); } if (source.TryGetProperty("Preferences", out token) && token.Type != JTokenType.Null) { Preferences = (AccountPreferences)serializer.Deserialize(token.CreateReader(), typeof(AccountPreferences)); } if (source.TryGetProperty("ProductDefaults", out token) && token.Type != JTokenType.Null) { ProductDefaults = (ProductDefaults)serializer.Deserialize(token.CreateReader(), typeof(ProductDefaults)); } if (source.TryGetProperty("Subdomain", out token) && token.Type != JTokenType.Null) { Subdomain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Subdomains", out token) && token.Type != JTokenType.Null) { Subdomains = (IEnumerable <string>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <string>)); } if (source.TryGetProperty("MobileSecuritySettings", out token) && token.Type != JTokenType.Null) { MobileSecuritySettings = (MobileSecuritySettings)serializer.Deserialize(token.CreateReader(), typeof(MobileSecuritySettings)); } if (source.TryGetProperty("LoginAccessControlDomains", out token) && token.Type != JTokenType.Null) { LoginAccessControlDomains = (AccessControlDomains)serializer.Deserialize(token.CreateReader(), typeof(AccessControlDomains)); } if (source.TryGetProperty("FolderAccessControlDomains", out token) && token.Type != JTokenType.Null) { FolderAccessControlDomains = (AccessControlDomains)serializer.Deserialize(token.CreateReader(), typeof(AccessControlDomains)); } if (source.TryGetProperty("StorageQuotaPerUser", out token) && token.Type != JTokenType.Null) { StorageQuotaPerUser = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("FreeTrialId", out token) && token.Type != JTokenType.Null) { FreeTrialId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Source", out token) && token.Type != JTokenType.Null) { Source = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("AttributedSource", out token) && token.Type != JTokenType.Null) { AttributedSource = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CompanyURL", out token) && token.Type != JTokenType.Null) { CompanyURL = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("MarketingOptIn", out token) && token.Type != JTokenType.Null) { MarketingOptIn = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CreditCardSecurityCode", out token) && token.Type != JTokenType.Null) { CreditCardSecurityCode = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ToolInformation", out token) && token.Type != JTokenType.Null) { ToolInformation = (IEnumerable <ToolInformation>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <ToolInformation>)); } if (source.TryGetProperty("BillingInformation", out token) && token.Type != JTokenType.Null) { BillingInformation = (BillingInfo)serializer.Deserialize(token.CreateReader(), typeof(BillingInfo)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ProductDefaults; if (typedSource != null) { ProductName = typedSource.ProductName; DefaultWindowTitle = typedSource.DefaultWindowTitle; TopLevelDomain = typedSource.TopLevelDomain; APITopLevelDomain = typedSource.APITopLevelDomain; DefaultApiVersion = typedSource.DefaultApiVersion; DefaultSmtpServer = typedSource.DefaultSmtpServer; NoReplyUserName = typedSource.NoReplyUserName; NoReplyUserEmail = typedSource.NoReplyUserEmail; SupportUserName = typedSource.SupportUserName; SupportUserEmail = typedSource.SupportUserEmail; DefaultEmailFooter = typedSource.DefaultEmailFooter; DefaultEmailFooterHtml = typedSource.DefaultEmailFooterHtml; DefaultEmailFooterPlaintext = typedSource.DefaultEmailFooterPlaintext; DefaultEmailOverview = typedSource.DefaultEmailOverview; SupportUserNotificationEmail = typedSource.SupportUserNotificationEmail; SystemType = typedSource.SystemType; } else { JToken token; if (source.TryGetProperty("ProductName", out token) && token.Type != JTokenType.Null) { ProductName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultWindowTitle", out token) && token.Type != JTokenType.Null) { DefaultWindowTitle = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("TopLevelDomain", out token) && token.Type != JTokenType.Null) { TopLevelDomain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("APITopLevelDomain", out token) && token.Type != JTokenType.Null) { APITopLevelDomain = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultApiVersion", out token) && token.Type != JTokenType.Null) { DefaultApiVersion = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultSmtpServer", out token) && token.Type != JTokenType.Null) { DefaultSmtpServer = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("NoReplyUserName", out token) && token.Type != JTokenType.Null) { NoReplyUserName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("NoReplyUserEmail", out token) && token.Type != JTokenType.Null) { NoReplyUserEmail = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SupportUserName", out token) && token.Type != JTokenType.Null) { SupportUserName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SupportUserEmail", out token) && token.Type != JTokenType.Null) { SupportUserEmail = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultEmailFooter", out token) && token.Type != JTokenType.Null) { DefaultEmailFooter = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultEmailFooterHtml", out token) && token.Type != JTokenType.Null) { DefaultEmailFooterHtml = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultEmailFooterPlaintext", out token) && token.Type != JTokenType.Null) { DefaultEmailFooterPlaintext = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultEmailOverview", out token) && token.Type != JTokenType.Null) { DefaultEmailOverview = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SupportUserNotificationEmail", out token) && token.Type != JTokenType.Null) { SupportUserNotificationEmail = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SystemType", out token) && token.Type != JTokenType.Null) { SystemType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AsyncOperation; if (typedSource != null) { Operation = typedSource.Operation; Account = typedSource.Account; AuthorityZone = typedSource.AuthorityZone; Source = typedSource.Source; User = typedSource.User; CreationDate = typedSource.CreationDate; State = typedSource.State; UpdateDate = typedSource.UpdateDate; Target = typedSource.Target; BatchID = typedSource.BatchID; BatchSourceID = typedSource.BatchSourceID; BatchTargetID = typedSource.BatchTargetID; BatchProgress = typedSource.BatchProgress; BatchState = typedSource.BatchState; BatchTotal = typedSource.BatchTotal; } else { JToken token; if (source.TryGetProperty("Operation", out token) && token.Type != JTokenType.Null) { Operation = (SafeEnum <AsyncOperationType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <AsyncOperationType>)); } if (source.TryGetProperty("Account", out token) && token.Type != JTokenType.Null) { Account = (Account)serializer.Deserialize(token.CreateReader(), typeof(Account)); } if (source.TryGetProperty("AuthorityZone", out token) && token.Type != JTokenType.Null) { AuthorityZone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if (source.TryGetProperty("Source", out token) && token.Type != JTokenType.Null) { Source = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("User", out token) && token.Type != JTokenType.Null) { User = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("CreationDate", out token) && token.Type != JTokenType.Null) { CreationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("State", out token) && token.Type != JTokenType.Null) { State = (SafeEnum <AsyncOperationState>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <AsyncOperationState>)); } if (source.TryGetProperty("UpdateDate", out token) && token.Type != JTokenType.Null) { UpdateDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("Target", out token) && token.Type != JTokenType.Null) { Target = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("BatchID", out token) && token.Type != JTokenType.Null) { BatchID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BatchSourceID", out token) && token.Type != JTokenType.Null) { BatchSourceID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BatchTargetID", out token) && token.Type != JTokenType.Null) { BatchTargetID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BatchProgress", out token) && token.Type != JTokenType.Null) { BatchProgress = (double?)serializer.Deserialize(token.CreateReader(), typeof(double?)); } if (source.TryGetProperty("BatchState", out token) && token.Type != JTokenType.Null) { BatchState = (SafeEnum <AsyncOperationState>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <AsyncOperationState>)); } if (source.TryGetProperty("BatchTotal", out token) && token.Type != JTokenType.Null) { BatchTotal = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccountPreferences; if (typedSource != null) { EnableViewOnly = typedSource.EnableViewOnly; EnableWatermarkOnViewOnly = typedSource.EnableWatermarkOnViewOnly; AllowProactiveNotifications = typedSource.AllowProactiveNotifications; ShowUserListToClients = typedSource.ShowUserListToClients; RequireLoginOnDownload = typedSource.RequireLoginOnDownload; RequireLoginByDefault = typedSource.RequireLoginByDefault; EnableClientSend = typedSource.EnableClientSend; EnableThumbnails = typedSource.EnableThumbnails; EnableSSO = typedSource.EnableSSO; VirusStrictness = typedSource.VirusStrictness; EnableSfAdi = typedSource.EnableSfAdi; EnableMultipleZones = typedSource.EnableMultipleZones; DefaultZone = typedSource.DefaultZone; EnableVersioning = typedSource.EnableVersioning; SystemType = typedSource.SystemType; EnableSync = typedSource.EnableSync; EnableSyncAutoUpdate = typedSource.EnableSyncAutoUpdate; SystemName = typedSource.SystemName; HomeScreenName = typedSource.HomeScreenName; ShowTermsCheckbox = typedSource.ShowTermsCheckbox; TermsCheckboxText = typedSource.TermsCheckboxText; TermsCheckboxStrictness = typedSource.TermsCheckboxStrictness; RequireCompanyNameWithUserInfo = typedSource.RequireCompanyNameWithUserInfo; EnableEditor = typedSource.EnableEditor; ShareIDMaxExpirationDays = typedSource.ShareIDMaxExpirationDays; AdminIsSuperUser = typedSource.AdminIsSuperUser; ShowFolderAccessList = typedSource.ShowFolderAccessList; FromEmailIsShareFile = typedSource.FromEmailIsShareFile; UseAlternateSMTP = typedSource.UseAlternateSMTP; ShowPasswordInEmail = typedSource.ShowPasswordInEmail; EmailPasswordText = typedSource.EmailPasswordText; EnableSelfNotificationsUpload = typedSource.EnableSelfNotificationsUpload; EnableSelfNotificationsDownload = typedSource.EnableSelfNotificationsDownload; EnableUploadShareIDReceipt = typedSource.EnableUploadShareIDReceipt; DefaultConsolidatedNotificationInterval = typedSource.DefaultConsolidatedNotificationInterval; ExpirationDays = typedSource.ExpirationDays; DefaultSortField = typedSource.DefaultSortField; DefaultSortOrder = typedSource.DefaultSortOrder; DefaultIsVersioned = typedSource.DefaultIsVersioned; DefaultMaxVersions = typedSource.DefaultMaxVersions; ViewOnlyWatermarkText = typedSource.ViewOnlyWatermarkText; EnableDocViewerPrinting = typedSource.EnableDocViewerPrinting; EnableWatermarkedDownloads = typedSource.EnableWatermarkedDownloads; EnableTwoFactorAuth = typedSource.EnableTwoFactorAuth; LoginFailMaxAttempts = typedSource.LoginFailMaxAttempts; LoginFailLockoutSecs = typedSource.LoginFailLockoutSecs; IPRestrictions = typedSource.IPRestrictions; InactiveTimeoutMins = typedSource.InactiveTimeoutMins; OAuth2RefreshTokenLifetimeMinutes = typedSource.OAuth2RefreshTokenLifetimeMinutes; PasswordRegEx = typedSource.PasswordRegEx; PasswordRegExFormula = typedSource.PasswordRegExFormula; PasswordRegExDescription = typedSource.PasswordRegExDescription; EnableActivationLinks = typedSource.EnableActivationLinks; IsFINRA = typedSource.IsFINRA; EnableOAuth = typedSource.EnableOAuth; EnableQandA = typedSource.EnableQandA; EnableQandATextInNotifications = typedSource.EnableQandATextInNotifications; UXMode = typedSource.UXMode; IndustryCode = typedSource.IndustryCode; PasswordMaxAgeDays = typedSource.PasswordMaxAgeDays; PasswordHistoryCount = typedSource.PasswordHistoryCount; MinimumLength = typedSource.MinimumLength; MinimumSpecialCharacters = typedSource.MinimumSpecialCharacters; MinimumNumeric = typedSource.MinimumNumeric; AllowedSpecialCharacters = typedSource.AllowedSpecialCharacters; EnableWebDAV = typedSource.EnableWebDAV; EnableFTP = typedSource.EnableFTP; EnableSFTP = typedSource.EnableSFTP; DisableMarketing = typedSource.DisableMarketing; VDRDocViewerURL = typedSource.VDRDocViewerURL; EnableSMBConnectorForAccount = typedSource.EnableSMBConnectorForAccount; EnablePersonalCloudConnectors = typedSource.EnablePersonalCloudConnectors; AccountID = typedSource.AccountID; EnableGetApp = typedSource.EnableGetApp; EnableStorageZoneConnector = typedSource.EnableStorageZoneConnector; HasAnyConnectorZones = typedSource.HasAnyConnectorZones; EnableENSForAccount = typedSource.EnableENSForAccount; ENSRecommendedPollingSyncInterval = typedSource.ENSRecommendedPollingSyncInterval; ENSRecommendedNotificationSyncInterval = typedSource.ENSRecommendedNotificationSyncInterval; ENSNotificationConfigurationCount = typedSource.ENSNotificationConfigurationCount; ENSFailSafePollingCount = typedSource.ENSFailSafePollingCount; ENSMaxNotificationSyncWaitCount = typedSource.ENSMaxNotificationSyncWaitCount; TrustedDomains = typedSource.TrustedDomains; EnableReportingV3 = typedSource.EnableReportingV3; EnableEncryptedEmailForOutlookPlugin = typedSource.EnableEncryptedEmailForOutlookPlugin; EnableDocPreviews = typedSource.EnableDocPreviews; DisablePasswordAutocompleteInWebApp = typedSource.DisablePasswordAutocompleteInWebApp; EnableDesktopEditorForAccount = typedSource.EnableDesktopEditorForAccount; UseStrictEmployeeDefinition = typedSource.UseStrictEmployeeDefinition; EmployeeEmailDomains = typedSource.EmployeeEmailDomains; IsPremier = typedSource.IsPremier; DisableShareConnectForAccount = typedSource.DisableShareConnectForAccount; EnableWebAppConnectorBrowsing = typedSource.EnableWebAppConnectorBrowsing; EnableStrictCrossdomainPolicy = typedSource.EnableStrictCrossdomainPolicy; DisableScanSnap = typedSource.DisableScanSnap; EnableFileCount = typedSource.EnableFileCount; EnableAntiVirus = typedSource.EnableAntiVirus; EnableFileLocking = typedSource.EnableFileLocking; EnableIntegrations = typedSource.EnableIntegrations; IntegrationProviders = typedSource.IntegrationProviders; EnableBouncedEmailNotifications = typedSource.EnableBouncedEmailNotifications; ShowDownloadLinkInUploadNotification = typedSource.ShowDownloadLinkInUploadNotification; EnableUserInvitations = typedSource.EnableUserInvitations; EnableClickTrails = typedSource.EnableClickTrails; CanStoreItemsInShareFile = typedSource.CanStoreItemsInShareFile; EnableHomeFolders = typedSource.EnableHomeFolders; } else { JToken token; if (source.TryGetProperty("EnableViewOnly", out token) && token.Type != JTokenType.Null) { EnableViewOnly = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableWatermarkOnViewOnly", out token) && token.Type != JTokenType.Null) { EnableWatermarkOnViewOnly = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("AllowProactiveNotifications", out token) && token.Type != JTokenType.Null) { AllowProactiveNotifications = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ShowUserListToClients", out token) && token.Type != JTokenType.Null) { ShowUserListToClients = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("RequireLoginOnDownload", out token) && token.Type != JTokenType.Null) { RequireLoginOnDownload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("RequireLoginByDefault", out token) && token.Type != JTokenType.Null) { RequireLoginByDefault = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableClientSend", out token) && token.Type != JTokenType.Null) { EnableClientSend = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableThumbnails", out token) && token.Type != JTokenType.Null) { EnableThumbnails = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableSSO", out token) && token.Type != JTokenType.Null) { EnableSSO = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("VirusStrictness", out token) && token.Type != JTokenType.Null) { VirusStrictness = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("EnableSfAdi", out token) && token.Type != JTokenType.Null) { EnableSfAdi = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableMultipleZones", out token) && token.Type != JTokenType.Null) { EnableMultipleZones = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DefaultZone", out token) && token.Type != JTokenType.Null) { DefaultZone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if (source.TryGetProperty("EnableVersioning", out token) && token.Type != JTokenType.Null) { EnableVersioning = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("SystemType", out token) && token.Type != JTokenType.Null) { SystemType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableSync", out token) && token.Type != JTokenType.Null) { EnableSync = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableSyncAutoUpdate", out token) && token.Type != JTokenType.Null) { EnableSyncAutoUpdate = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("SystemName", out token) && token.Type != JTokenType.Null) { SystemName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HomeScreenName", out token) && token.Type != JTokenType.Null) { HomeScreenName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ShowTermsCheckbox", out token) && token.Type != JTokenType.Null) { ShowTermsCheckbox = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("TermsCheckboxText", out token) && token.Type != JTokenType.Null) { TermsCheckboxText = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("TermsCheckboxStrictness", out token) && token.Type != JTokenType.Null) { TermsCheckboxStrictness = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("RequireCompanyNameWithUserInfo", out token) && token.Type != JTokenType.Null) { RequireCompanyNameWithUserInfo = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableEditor", out token) && token.Type != JTokenType.Null) { EnableEditor = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ShareIDMaxExpirationDays", out token) && token.Type != JTokenType.Null) { ShareIDMaxExpirationDays = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("AdminIsSuperUser", out token) && token.Type != JTokenType.Null) { AdminIsSuperUser = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ShowFolderAccessList", out token) && token.Type != JTokenType.Null) { ShowFolderAccessList = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("FromEmailIsShareFile", out token) && token.Type != JTokenType.Null) { FromEmailIsShareFile = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("UseAlternateSMTP", out token) && token.Type != JTokenType.Null) { UseAlternateSMTP = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ShowPasswordInEmail", out token) && token.Type != JTokenType.Null) { ShowPasswordInEmail = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EmailPasswordText", out token) && token.Type != JTokenType.Null) { EmailPasswordText = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableSelfNotificationsUpload", out token) && token.Type != JTokenType.Null) { EnableSelfNotificationsUpload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableSelfNotificationsDownload", out token) && token.Type != JTokenType.Null) { EnableSelfNotificationsDownload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableUploadShareIDReceipt", out token) && token.Type != JTokenType.Null) { EnableUploadShareIDReceipt = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DefaultConsolidatedNotificationInterval", out token) && token.Type != JTokenType.Null) { DefaultConsolidatedNotificationInterval = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ExpirationDays", out token) && token.Type != JTokenType.Null) { ExpirationDays = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("DefaultSortField", out token) && token.Type != JTokenType.Null) { DefaultSortField = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultSortOrder", out token) && token.Type != JTokenType.Null) { DefaultSortOrder = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultIsVersioned", out token) && token.Type != JTokenType.Null) { DefaultIsVersioned = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DefaultMaxVersions", out token) && token.Type != JTokenType.Null) { DefaultMaxVersions = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ViewOnlyWatermarkText", out token) && token.Type != JTokenType.Null) { ViewOnlyWatermarkText = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableDocViewerPrinting", out token) && token.Type != JTokenType.Null) { EnableDocViewerPrinting = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableWatermarkedDownloads", out token) && token.Type != JTokenType.Null) { EnableWatermarkedDownloads = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableTwoFactorAuth", out token) && token.Type != JTokenType.Null) { EnableTwoFactorAuth = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("LoginFailMaxAttempts", out token) && token.Type != JTokenType.Null) { LoginFailMaxAttempts = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("LoginFailLockoutSecs", out token) && token.Type != JTokenType.Null) { LoginFailLockoutSecs = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("IPRestrictions", out token) && token.Type != JTokenType.Null) { IPRestrictions = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("InactiveTimeoutMins", out token) && token.Type != JTokenType.Null) { InactiveTimeoutMins = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("OAuth2RefreshTokenLifetimeMinutes", out token) && token.Type != JTokenType.Null) { OAuth2RefreshTokenLifetimeMinutes = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("PasswordRegEx", out token) && token.Type != JTokenType.Null) { PasswordRegEx = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PasswordRegExFormula", out token) && token.Type != JTokenType.Null) { PasswordRegExFormula = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("PasswordRegExDescription", out token) && token.Type != JTokenType.Null) { PasswordRegExDescription = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableActivationLinks", out token) && token.Type != JTokenType.Null) { EnableActivationLinks = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsFINRA", out token) && token.Type != JTokenType.Null) { IsFINRA = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableOAuth", out token) && token.Type != JTokenType.Null) { EnableOAuth = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableQandA", out token) && token.Type != JTokenType.Null) { EnableQandA = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("EnableQandATextInNotifications", out token) && token.Type != JTokenType.Null) { EnableQandATextInNotifications = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("UXMode", out token) && token.Type != JTokenType.Null) { UXMode = (SafeEnum <UXMode>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <UXMode>)); } if (source.TryGetProperty("IndustryCode", out token) && token.Type != JTokenType.Null) { IndustryCode = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("PasswordMaxAgeDays", out token) && token.Type != JTokenType.Null) { PasswordMaxAgeDays = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("PasswordHistoryCount", out token) && token.Type != JTokenType.Null) { PasswordHistoryCount = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("MinimumLength", out token) && token.Type != JTokenType.Null) { MinimumLength = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("MinimumSpecialCharacters", out token) && token.Type != JTokenType.Null) { MinimumSpecialCharacters = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("MinimumNumeric", out token) && token.Type != JTokenType.Null) { MinimumNumeric = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("AllowedSpecialCharacters", out token) && token.Type != JTokenType.Null) { AllowedSpecialCharacters = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableWebDAV", out token) && token.Type != JTokenType.Null) { EnableWebDAV = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableFTP", out token) && token.Type != JTokenType.Null) { EnableFTP = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableSFTP", out token) && token.Type != JTokenType.Null) { EnableSFTP = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DisableMarketing", out token) && token.Type != JTokenType.Null) { DisableMarketing = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("VDRDocViewerURL", out token) && token.Type != JTokenType.Null) { VDRDocViewerURL = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableSMBConnectorForAccount", out token) && token.Type != JTokenType.Null) { EnableSMBConnectorForAccount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnablePersonalCloudConnectors", out token) && token.Type != JTokenType.Null) { EnablePersonalCloudConnectors = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("AccountID", out token) && token.Type != JTokenType.Null) { AccountID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableGetApp", out token) && token.Type != JTokenType.Null) { EnableGetApp = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableStorageZoneConnector", out token) && token.Type != JTokenType.Null) { EnableStorageZoneConnector = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("HasAnyConnectorZones", out token) && token.Type != JTokenType.Null) { HasAnyConnectorZones = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableENSForAccount", out token) && token.Type != JTokenType.Null) { EnableENSForAccount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ENSRecommendedPollingSyncInterval", out token) && token.Type != JTokenType.Null) { ENSRecommendedPollingSyncInterval = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ENSRecommendedNotificationSyncInterval", out token) && token.Type != JTokenType.Null) { ENSRecommendedNotificationSyncInterval = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ENSNotificationConfigurationCount", out token) && token.Type != JTokenType.Null) { ENSNotificationConfigurationCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ENSFailSafePollingCount", out token) && token.Type != JTokenType.Null) { ENSFailSafePollingCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ENSMaxNotificationSyncWaitCount", out token) && token.Type != JTokenType.Null) { ENSMaxNotificationSyncWaitCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("TrustedDomains", out token) && token.Type != JTokenType.Null) { TrustedDomains = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableReportingV3", out token) && token.Type != JTokenType.Null) { EnableReportingV3 = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableEncryptedEmailForOutlookPlugin", out token) && token.Type != JTokenType.Null) { EnableEncryptedEmailForOutlookPlugin = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableDocPreviews", out token) && token.Type != JTokenType.Null) { EnableDocPreviews = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DisablePasswordAutocompleteInWebApp", out token) && token.Type != JTokenType.Null) { DisablePasswordAutocompleteInWebApp = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableDesktopEditorForAccount", out token) && token.Type != JTokenType.Null) { EnableDesktopEditorForAccount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("UseStrictEmployeeDefinition", out token) && token.Type != JTokenType.Null) { UseStrictEmployeeDefinition = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EmployeeEmailDomains", out token) && token.Type != JTokenType.Null) { EmployeeEmailDomains = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsPremier", out token) && token.Type != JTokenType.Null) { IsPremier = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DisableShareConnectForAccount", out token) && token.Type != JTokenType.Null) { DisableShareConnectForAccount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableWebAppConnectorBrowsing", out token) && token.Type != JTokenType.Null) { EnableWebAppConnectorBrowsing = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableStrictCrossdomainPolicy", out token) && token.Type != JTokenType.Null) { EnableStrictCrossdomainPolicy = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DisableScanSnap", out token) && token.Type != JTokenType.Null) { DisableScanSnap = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableFileCount", out token) && token.Type != JTokenType.Null) { EnableFileCount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableAntiVirus", out token) && token.Type != JTokenType.Null) { EnableAntiVirus = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableFileLocking", out token) && token.Type != JTokenType.Null) { EnableFileLocking = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableIntegrations", out token) && token.Type != JTokenType.Null) { EnableIntegrations = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IntegrationProviders", out token) && token.Type != JTokenType.Null) { IntegrationProviders = (IEnumerable <SafeEnum <IntegrationProvider> >)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <SafeEnum <IntegrationProvider> >)); } if (source.TryGetProperty("EnableBouncedEmailNotifications", out token) && token.Type != JTokenType.Null) { EnableBouncedEmailNotifications = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ShowDownloadLinkInUploadNotification", out token) && token.Type != JTokenType.Null) { ShowDownloadLinkInUploadNotification = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableUserInvitations", out token) && token.Type != JTokenType.Null) { EnableUserInvitations = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableClickTrails", out token) && token.Type != JTokenType.Null) { EnableClickTrails = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanStoreItemsInShareFile", out token) && token.Type != JTokenType.Null) { CanStoreItemsInShareFile = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableHomeFolders", out token) && token.Type != JTokenType.Null) { EnableHomeFolders = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Share; if (typedSource != null) { AliasID = typedSource.AliasID; ShareType = typedSource.ShareType; Title = typedSource.Title; HasSentMessage = typedSource.HasSentMessage; SentMessageTitle = typedSource.SentMessageTitle; RequireLogin = typedSource.RequireLogin; RequireUserInfo = typedSource.RequireUserInfo; Parent = typedSource.Parent; Creator = typedSource.Creator; User = typedSource.User; Items = typedSource.Items; CreationDate = typedSource.CreationDate; ExpirationDate = typedSource.ExpirationDate; MaxDownloads = typedSource.MaxDownloads; TotalDownloads = typedSource.TotalDownloads; IsViewOnly = typedSource.IsViewOnly; TrackUntilDate = typedSource.TrackUntilDate; SendFrequency = typedSource.SendFrequency; SendInterval = typedSource.SendInterval; LastDateSent = typedSource.LastDateSent; IsConsumed = typedSource.IsConsumed; IsRead = typedSource.IsRead; IsArchived = typedSource.IsArchived; SendTool = typedSource.SendTool; SendMethod = typedSource.SendMethod; UsesStreamIDs = typedSource.UsesStreamIDs; Uri = typedSource.Uri; Recipients = typedSource.Recipients; Zone = typedSource.Zone; Signature = typedSource.Signature; HasRemoteChildren = typedSource.HasRemoteChildren; Redirection = typedSource.Redirection; ShareSubType = typedSource.ShareSubType; } else { JToken token; if (source.TryGetProperty("AliasID", out token) && token.Type != JTokenType.Null) { AliasID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ShareType", out token) && token.Type != JTokenType.Null) { ShareType = (SafeEnum <ShareType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <ShareType>)); } if (source.TryGetProperty("Title", out token) && token.Type != JTokenType.Null) { Title = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HasSentMessage", out token) && token.Type != JTokenType.Null) { HasSentMessage = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("SentMessageTitle", out token) && token.Type != JTokenType.Null) { SentMessageTitle = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("RequireLogin", out token) && token.Type != JTokenType.Null) { RequireLogin = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("RequireUserInfo", out token) && token.Type != JTokenType.Null) { RequireUserInfo = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Parent", out token) && token.Type != JTokenType.Null) { Parent = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("Creator", out token) && token.Type != JTokenType.Null) { Creator = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("User", out token) && token.Type != JTokenType.Null) { User = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("Items", out token) && token.Type != JTokenType.Null) { Items = (IEnumerable <Item>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <Item>)); } if (source.TryGetProperty("CreationDate", out token) && token.Type != JTokenType.Null) { CreationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ExpirationDate", out token) && token.Type != JTokenType.Null) { ExpirationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("MaxDownloads", out token) && token.Type != JTokenType.Null) { MaxDownloads = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("TotalDownloads", out token) && token.Type != JTokenType.Null) { TotalDownloads = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("IsViewOnly", out token) && token.Type != JTokenType.Null) { IsViewOnly = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("TrackUntilDate", out token) && token.Type != JTokenType.Null) { TrackUntilDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("SendFrequency", out token) && token.Type != JTokenType.Null) { SendFrequency = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("SendInterval", out token) && token.Type != JTokenType.Null) { SendInterval = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("LastDateSent", out token) && token.Type != JTokenType.Null) { LastDateSent = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("IsConsumed", out token) && token.Type != JTokenType.Null) { IsConsumed = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsRead", out token) && token.Type != JTokenType.Null) { IsRead = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsArchived", out token) && token.Type != JTokenType.Null) { IsArchived = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("SendTool", out token) && token.Type != JTokenType.Null) { SendTool = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SendMethod", out token) && token.Type != JTokenType.Null) { SendMethod = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("UsesStreamIDs", out token) && token.Type != JTokenType.Null) { UsesStreamIDs = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Uri", out token) && token.Type != JTokenType.Null) { Uri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("Recipients", out token) && token.Type != JTokenType.Null) { Recipients = (IEnumerable <ShareAlias>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <ShareAlias>)); } if (source.TryGetProperty("Zone", out token) && token.Type != JTokenType.Null) { Zone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if (source.TryGetProperty("Signature", out token) && token.Type != JTokenType.Null) { Signature = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HasRemoteChildren", out token) && token.Type != JTokenType.Null) { HasRemoteChildren = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Redirection", out token) && token.Type != JTokenType.Null) { Redirection = (Redirection)serializer.Deserialize(token.CreateReader(), typeof(Redirection)); } if (source.TryGetProperty("ShareSubType", out token) && token.Type != JTokenType.Null) { ShareSubType = (SafeEnum <ShareSubType>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <ShareSubType>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as StorageCenter; if (typedSource != null) { Zone = typedSource.Zone; Address = typedSource.Address; LocalAddress = typedSource.LocalAddress; ExternalAddress = typedSource.ExternalAddress; DefaultExternalUrl = typedSource.DefaultExternalUrl; HostName = typedSource.HostName; Services = typedSource.Services; Version = typedSource.Version; Enabled = typedSource.Enabled; LastHeartBeat = typedSource.LastHeartBeat; ExternalUrl = typedSource.ExternalUrl; MetadataProxyAddress = typedSource.MetadataProxyAddress; LastPingBack = typedSource.LastPingBack; Metadata = typedSource.Metadata; } else { JToken token; if (source.TryGetProperty("Zone", out token) && token.Type != JTokenType.Null) { Zone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if (source.TryGetProperty("Address", out token) && token.Type != JTokenType.Null) { Address = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LocalAddress", out token) && token.Type != JTokenType.Null) { LocalAddress = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ExternalAddress", out token) && token.Type != JTokenType.Null) { ExternalAddress = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DefaultExternalUrl", out token) && token.Type != JTokenType.Null) { DefaultExternalUrl = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HostName", out token) && token.Type != JTokenType.Null) { HostName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Services", out token) && token.Type != JTokenType.Null) { Services = (SafeEnum <ZoneService>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <ZoneService>)); } if (source.TryGetProperty("Version", out token) && token.Type != JTokenType.Null) { Version = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Enabled", out token) && token.Type != JTokenType.Null) { Enabled = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("LastHeartBeat", out token) && token.Type != JTokenType.Null) { LastHeartBeat = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ExternalUrl", out token) && token.Type != JTokenType.Null) { ExternalUrl = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("MetadataProxyAddress", out token) && token.Type != JTokenType.Null) { MetadataProxyAddress = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LastPingBack", out token) && token.Type != JTokenType.Null) { LastPingBack = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("Metadata", out token) && token.Type != JTokenType.Null) { Metadata = (IEnumerable <Metadata>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <Metadata>)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as UploadSpecification; if (typedSource != null) { Method = typedSource.Method; PrepareUri = typedSource.PrepareUri; ChunkUri = typedSource.ChunkUri; FinishUri = typedSource.FinishUri; ProgressData = typedSource.ProgressData; IsResume = typedSource.IsResume; ResumeIndex = typedSource.ResumeIndex; ResumeOffset = typedSource.ResumeOffset; ResumeFileHash = typedSource.ResumeFileHash; } else { JToken token; if (source.TryGetProperty("Method", out token) && token.Type != JTokenType.Null) { Method = (SafeEnum <UploadMethod>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <UploadMethod>)); } if (source.TryGetProperty("PrepareUri", out token) && token.Type != JTokenType.Null) { PrepareUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("ChunkUri", out token) && token.Type != JTokenType.Null) { ChunkUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("FinishUri", out token) && token.Type != JTokenType.Null) { FinishUri = (Uri)serializer.Deserialize(token.CreateReader(), typeof(Uri)); } if (source.TryGetProperty("ProgressData", out token) && token.Type != JTokenType.Null) { ProgressData = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsResume", out token) && token.Type != JTokenType.Null) { IsResume = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("ResumeIndex", out token) && token.Type != JTokenType.Null) { ResumeIndex = (long)serializer.Deserialize(token.CreateReader(), typeof(long)); } if (source.TryGetProperty("ResumeOffset", out token) && token.Type != JTokenType.Null) { ResumeOffset = (long)serializer.Deserialize(token.CreateReader(), typeof(long)); } if (source.TryGetProperty("ResumeFileHash", out token) && token.Type != JTokenType.Null) { ResumeFileHash = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as UserConfirmationSettings; if (typedSource != null) { FirstName = typedSource.FirstName; LastName = typedSource.LastName; Company = typedSource.Company; Password = typedSource.Password; DayLightName = typedSource.DayLightName; UTCOffset = typedSource.UTCOffset; DateFormat = typedSource.DateFormat; TimeFormat = typedSource.TimeFormat; EmailInterval = typedSource.EmailInterval; } else { JToken token; if (source.TryGetProperty("FirstName", out token) && token.Type != JTokenType.Null) { FirstName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LastName", out token) && token.Type != JTokenType.Null) { LastName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Company", out token) && token.Type != JTokenType.Null) { Company = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Password", out token) && token.Type != JTokenType.Null) { Password = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DayLightName", out token) && token.Type != JTokenType.Null) { DayLightName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("UTCOffset", out token) && token.Type != JTokenType.Null) { UTCOffset = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DateFormat", out token) && token.Type != JTokenType.Null) { DateFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("TimeFormat", out token) && token.Type != JTokenType.Null) { TimeFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EmailInterval", out token) && token.Type != JTokenType.Null) { EmailInterval = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as UserPreferences; if (typedSource != null) { EnableFlashUpload = typedSource.EnableFlashUpload; EnableJavaUpload = typedSource.EnableJavaUpload; EnableJavaDownload = typedSource.EnableJavaDownload; RememberCustomMessages = typedSource.RememberCustomMessages; RequireLoginByDefault = typedSource.RequireLoginByDefault; NotifyOnUploadByDefault = typedSource.NotifyOnUploadByDefault; NotifyOnDownloadByDefault = typedSource.NotifyOnDownloadByDefault; CanResetPassword = typedSource.CanResetPassword; CanViewMySettings = typedSource.CanViewMySettings; IsSharedUserAccount = typedSource.IsSharedUserAccount; TimeZone = typedSource.TimeZone; DaylightSavingMode = typedSource.DaylightSavingMode; TimeZoneOffset = typedSource.TimeZoneOffset; TimeZoneOffsetMins = typedSource.TimeZoneOffsetMins; DisplayUserMessage = typedSource.DisplayUserMessage; UserMessageCode = typedSource.UserMessageCode; NotificationInterval = typedSource.NotificationInterval; ShowTutorial = typedSource.ShowTutorial; EnableToolOverride = typedSource.EnableToolOverride; IsResetSecurityQuestionRequired = typedSource.IsResetSecurityQuestionRequired; TimeFormat = typedSource.TimeFormat; LongTimeFormat = typedSource.LongTimeFormat; DateFormat = typedSource.DateFormat; EnableShareConnect = typedSource.EnableShareConnect; ReceiveBouncedEmailNotifications = typedSource.ReceiveBouncedEmailNotifications; } else { JToken token; if (source.TryGetProperty("EnableFlashUpload", out token) && token.Type != JTokenType.Null) { EnableFlashUpload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableJavaUpload", out token) && token.Type != JTokenType.Null) { EnableJavaUpload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableJavaDownload", out token) && token.Type != JTokenType.Null) { EnableJavaDownload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("RememberCustomMessages", out token) && token.Type != JTokenType.Null) { RememberCustomMessages = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("RequireLoginByDefault", out token) && token.Type != JTokenType.Null) { RequireLoginByDefault = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyOnUploadByDefault", out token) && token.Type != JTokenType.Null) { NotifyOnUploadByDefault = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyOnDownloadByDefault", out token) && token.Type != JTokenType.Null) { NotifyOnDownloadByDefault = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanResetPassword", out token) && token.Type != JTokenType.Null) { CanResetPassword = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanViewMySettings", out token) && token.Type != JTokenType.Null) { CanViewMySettings = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsSharedUserAccount", out token) && token.Type != JTokenType.Null) { IsSharedUserAccount = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("TimeZone", out token) && token.Type != JTokenType.Null) { TimeZone = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DaylightSavingMode", out token) && token.Type != JTokenType.Null) { DaylightSavingMode = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("TimeZoneOffset", out token) && token.Type != JTokenType.Null) { TimeZoneOffset = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("TimeZoneOffsetMins", out token) && token.Type != JTokenType.Null) { TimeZoneOffsetMins = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("DisplayUserMessage", out token) && token.Type != JTokenType.Null) { DisplayUserMessage = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("UserMessageCode", out token) && token.Type != JTokenType.Null) { UserMessageCode = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("NotificationInterval", out token) && token.Type != JTokenType.Null) { NotificationInterval = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ShowTutorial", out token) && token.Type != JTokenType.Null) { ShowTutorial = (SafeEnum <TypeOfTour>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <TypeOfTour>)); } if (source.TryGetProperty("EnableToolOverride", out token) && token.Type != JTokenType.Null) { EnableToolOverride = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("IsResetSecurityQuestionRequired", out token) && token.Type != JTokenType.Null) { IsResetSecurityQuestionRequired = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("TimeFormat", out token) && token.Type != JTokenType.Null) { TimeFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LongTimeFormat", out token) && token.Type != JTokenType.Null) { LongTimeFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DateFormat", out token) && token.Type != JTokenType.Null) { DateFormat = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableShareConnect", out token) && token.Type != JTokenType.Null) { EnableShareConnect = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ReceiveBouncedEmailNotifications", out token) && token.Type != JTokenType.Null) { ReceiveBouncedEmailNotifications = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Session; if (typedSource != null) { Principal = typedSource.Principal; AuthenticationType = typedSource.AuthenticationType; OAuth2ClientName = typedSource.OAuth2ClientName; Tool = typedSource.Tool; Version = typedSource.Version; ClientIPAddress = typedSource.ClientIPAddress; IsAuthenticated = typedSource.IsAuthenticated; Name = typedSource.Name; DeviceUser = typedSource.DeviceUser; } else { JToken token; if (source.TryGetProperty("Principal", out token) && token.Type != JTokenType.Null) { Principal = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if (source.TryGetProperty("AuthenticationType", out token) && token.Type != JTokenType.Null) { AuthenticationType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("OAuth2ClientName", out token) && token.Type != JTokenType.Null) { OAuth2ClientName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Tool", out token) && token.Type != JTokenType.Null) { Tool = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Version", out token) && token.Type != JTokenType.Null) { Version = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ClientIPAddress", out token) && token.Type != JTokenType.Null) { ClientIPAddress = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsAuthenticated", out token) && token.Type != JTokenType.Null) { IsAuthenticated = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DeviceUser", out token) && token.Type != JTokenType.Null) { DeviceUser = (DeviceUser)serializer.Deserialize(token.CreateReader(), typeof(DeviceUser)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccessControl; if (typedSource != null) { Item = typedSource.Item; Principal = typedSource.Principal; CanUpload = typedSource.CanUpload; CanDownload = typedSource.CanDownload; CanView = typedSource.CanView; CanDelete = typedSource.CanDelete; CanManagePermissions = typedSource.CanManagePermissions; NotifyOnUpload = typedSource.NotifyOnUpload; NotifyOnDownload = typedSource.NotifyOnDownload; IsOwner = typedSource.IsOwner; } else { JToken token; if (source.TryGetProperty("Item", out token) && token.Type != JTokenType.Null) { Item = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("Principal", out token) && token.Type != JTokenType.Null) { Principal = (Principal)serializer.Deserialize(token.CreateReader(), typeof(Principal)); } if (source.TryGetProperty("CanUpload", out token) && token.Type != JTokenType.Null) { CanUpload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanDownload", out token) && token.Type != JTokenType.Null) { CanDownload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanView", out token) && token.Type != JTokenType.Null) { CanView = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanDelete", out token) && token.Type != JTokenType.Null) { CanDelete = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanManagePermissions", out token) && token.Type != JTokenType.Null) { CanManagePermissions = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyOnUpload", out token) && token.Type != JTokenType.Null) { NotifyOnUpload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("NotifyOnDownload", out token) && token.Type != JTokenType.Null) { NotifyOnDownload = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsOwner", out token) && token.Type != JTokenType.Null) { IsOwner = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as AccountUser; if (typedSource != null) { IsAdministrator = typedSource.IsAdministrator; CanCreateFolders = typedSource.CanCreateFolders; CanUseFileBox = typedSource.CanUseFileBox; CanManageUsers = typedSource.CanManageUsers; IsVirtualClient = typedSource.IsVirtualClient; DiskSpace = typedSource.DiskSpace; Bandwidth = typedSource.Bandwidth; StorageQuotaLimitGB = typedSource.StorageQuotaLimitGB; StorageQuotaPercent = typedSource.StorageQuotaPercent; EnableHardLimit = typedSource.EnableHardLimit; } else { JToken token; if (source.TryGetProperty("IsAdministrator", out token) && token.Type != JTokenType.Null) { IsAdministrator = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanCreateFolders", out token) && token.Type != JTokenType.Null) { CanCreateFolders = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanUseFileBox", out token) && token.Type != JTokenType.Null) { CanUseFileBox = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanManageUsers", out token) && token.Type != JTokenType.Null) { CanManageUsers = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsVirtualClient", out token) && token.Type != JTokenType.Null) { IsVirtualClient = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("DiskSpace", out token) && token.Type != JTokenType.Null) { DiskSpace = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("Bandwidth", out token) && token.Type != JTokenType.Null) { Bandwidth = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("StorageQuotaLimitGB", out token) && token.Type != JTokenType.Null) { StorageQuotaLimitGB = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("StorageQuotaPercent", out token) && token.Type != JTokenType.Null) { StorageQuotaPercent = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("EnableHardLimit", out token) && token.Type != JTokenType.Null) { EnableHardLimit = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as PlanFeatures; if (typedSource != null) { PlanType = typedSource.PlanType; API = typedSource.API; Outlook = typedSource.Outlook; DriveMapping = typedSource.DriveMapping; CLI = typedSource.CLI; FTP = typedSource.FTP; FTPS = typedSource.FTPS; Sync = typedSource.Sync; AntiVirus = typedSource.AntiVirus; RequireLoginOnDownload = typedSource.RequireLoginOnDownload; MaxFileMB = typedSource.MaxFileMB; PlanStorMB = typedSource.PlanStorMB; PlanBandMB = typedSource.PlanBandMB; SystemName = typedSource.SystemName; SystemType = typedSource.SystemType; HasOutlookOptions = typedSource.HasOutlookOptions; SimpleMAPI = typedSource.SimpleMAPI; ForceAttachLink = typedSource.ForceAttachLink; UsedStorMB = typedSource.UsedStorMB; UsedStorUtcTicks = typedSource.UsedStorUtcTicks; UsedStorBytes = typedSource.UsedStorBytes; IsEmployee = typedSource.IsEmployee; IsAdministrator = typedSource.IsAdministrator; CanCreateRootFolders = typedSource.CanCreateRootFolders; CanUseFileBox = typedSource.CanUseFileBox; IsConfirmed = typedSource.IsConfirmed; CanResetPassword = typedSource.CanResetPassword; PasswordRegEx = typedSource.PasswordRegEx; CanManageMySettings = typedSource.CanManageMySettings; HomeFolder = typedSource.HomeFolder; EnableAutoUpdate = typedSource.EnableAutoUpdate; EnableTopLevelView = typedSource.EnableTopLevelView; } else { JToken token; if (source.TryGetProperty("PlanType", out token) && token.Type != JTokenType.Null) { PlanType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("API", out token) && token.Type != JTokenType.Null) { API = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("Outlook", out token) && token.Type != JTokenType.Null) { Outlook = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("DriveMapping", out token) && token.Type != JTokenType.Null) { DriveMapping = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("CLI", out token) && token.Type != JTokenType.Null) { CLI = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("FTP", out token) && token.Type != JTokenType.Null) { FTP = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("FTPS", out token) && token.Type != JTokenType.Null) { FTPS = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("Sync", out token) && token.Type != JTokenType.Null) { Sync = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("AntiVirus", out token) && token.Type != JTokenType.Null) { AntiVirus = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("RequireLoginOnDownload", out token) && token.Type != JTokenType.Null) { RequireLoginOnDownload = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("MaxFileMB", out token) && token.Type != JTokenType.Null) { MaxFileMB = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("PlanStorMB", out token) && token.Type != JTokenType.Null) { PlanStorMB = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("PlanBandMB", out token) && token.Type != JTokenType.Null) { PlanBandMB = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("SystemName", out token) && token.Type != JTokenType.Null) { SystemName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SystemType", out token) && token.Type != JTokenType.Null) { SystemType = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HasOutlookOptions", out token) && token.Type != JTokenType.Null) { HasOutlookOptions = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("SimpleMAPI", out token) && token.Type != JTokenType.Null) { SimpleMAPI = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ForceAttachLink", out token) && token.Type != JTokenType.Null) { ForceAttachLink = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("UsedStorMB", out token) && token.Type != JTokenType.Null) { UsedStorMB = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("UsedStorUtcTicks", out token) && token.Type != JTokenType.Null) { UsedStorUtcTicks = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("UsedStorBytes", out token) && token.Type != JTokenType.Null) { UsedStorBytes = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsEmployee", out token) && token.Type != JTokenType.Null) { IsEmployee = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("IsAdministrator", out token) && token.Type != JTokenType.Null) { IsAdministrator = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("CanCreateRootFolders", out token) && token.Type != JTokenType.Null) { CanCreateRootFolders = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("CanUseFileBox", out token) && token.Type != JTokenType.Null) { CanUseFileBox = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("IsConfirmed", out token) && token.Type != JTokenType.Null) { IsConfirmed = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("CanResetPassword", out token) && token.Type != JTokenType.Null) { CanResetPassword = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("PasswordRegEx", out token) && token.Type != JTokenType.Null) { PasswordRegEx = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CanManageMySettings", out token) && token.Type != JTokenType.Null) { CanManageMySettings = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("HomeFolder", out token) && token.Type != JTokenType.Null) { HomeFolder = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("EnableAutoUpdate", out token) && token.Type != JTokenType.Null) { EnableAutoUpdate = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("EnableTopLevelView", out token) && token.Type != JTokenType.Null) { EnableTopLevelView = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as SSOAccountProvider; if (typedSource != null) { LogoutUrl = typedSource.LogoutUrl; LoginUrl = typedSource.LoginUrl; IPRestrictions = typedSource.IPRestrictions; ForceSSO = typedSource.ForceSSO; Certificate = typedSource.Certificate; Account = typedSource.Account; EntityID = typedSource.EntityID; SFEntityID = typedSource.SFEntityID; SPInitatedAuthContext = typedSource.SPInitatedAuthContext; SPInitatedAuthMethod = typedSource.SPInitatedAuthMethod; UseWebAuthentication = typedSource.UseWebAuthentication; IsActive = typedSource.IsActive; ProviderID = typedSource.ProviderID; DebugMode = typedSource.DebugMode; LenientSignatures = typedSource.LenientSignatures; } else { JToken token; if (source.TryGetProperty("LogoutUrl", out token) && token.Type != JTokenType.Null) { LogoutUrl = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("LoginUrl", out token) && token.Type != JTokenType.Null) { LoginUrl = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IPRestrictions", out token) && token.Type != JTokenType.Null) { IPRestrictions = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ForceSSO", out token) && token.Type != JTokenType.Null) { ForceSSO = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Certificate", out token) && token.Type != JTokenType.Null) { Certificate = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Account", out token) && token.Type != JTokenType.Null) { Account = (Account)serializer.Deserialize(token.CreateReader(), typeof(Account)); } if (source.TryGetProperty("EntityID", out token) && token.Type != JTokenType.Null) { EntityID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SFEntityID", out token) && token.Type != JTokenType.Null) { SFEntityID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SPInitatedAuthContext", out token) && token.Type != JTokenType.Null) { SPInitatedAuthContext = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("SPInitatedAuthMethod", out token) && token.Type != JTokenType.Null) { SPInitatedAuthMethod = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("UseWebAuthentication", out token) && token.Type != JTokenType.Null) { UseWebAuthentication = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("IsActive", out token) && token.Type != JTokenType.Null) { IsActive = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ProviderID", out token) && token.Type != JTokenType.Null) { ProviderID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DebugMode", out token) && token.Type != JTokenType.Null) { DebugMode = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("LenientSignatures", out token) && token.Type != JTokenType.Null) { LenientSignatures = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as UploadRequestParams; if (typedSource != null) { Method = typedSource.Method; Raw = typedSource.Raw; FileName = typedSource.FileName; FileSize = typedSource.FileSize; BatchId = typedSource.BatchId; BatchLast = typedSource.BatchLast; CanResume = typedSource.CanResume; StartOver = typedSource.StartOver; Unzip = typedSource.Unzip; Overwrite = typedSource.Overwrite; Opid = typedSource.Opid; Title = typedSource.Title; Tool = typedSource.Tool; Details = typedSource.Details; IsSend = typedSource.IsSend; SendGuid = typedSource.SendGuid; Notify = typedSource.Notify; ThreadCount = typedSource.ThreadCount; ClientCreatedDate = typedSource.ClientCreatedDate; ClientModifiedDate = typedSource.ClientModifiedDate; } else { JToken token; if (source.TryGetProperty("Method", out token) && token.Type != JTokenType.Null) { Method = (SafeEnum <UploadMethod>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <UploadMethod>)); } if (source.TryGetProperty("Raw", out token) && token.Type != JTokenType.Null) { Raw = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("FileName", out token) && token.Type != JTokenType.Null) { FileName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("FileSize", out token) && token.Type != JTokenType.Null) { FileSize = (long?)serializer.Deserialize(token.CreateReader(), typeof(long?)); } if (source.TryGetProperty("BatchId", out token) && token.Type != JTokenType.Null) { BatchId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("BatchLast", out token) && token.Type != JTokenType.Null) { BatchLast = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("CanResume", out token) && token.Type != JTokenType.Null) { CanResume = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("StartOver", out token) && token.Type != JTokenType.Null) { StartOver = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Unzip", out token) && token.Type != JTokenType.Null) { Unzip = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Overwrite", out token) && token.Type != JTokenType.Null) { Overwrite = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Opid", out token) && token.Type != JTokenType.Null) { Opid = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Title", out token) && token.Type != JTokenType.Null) { Title = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Tool", out token) && token.Type != JTokenType.Null) { Tool = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Details", out token) && token.Type != JTokenType.Null) { Details = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsSend", out token) && token.Type != JTokenType.Null) { IsSend = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("SendGuid", out token) && token.Type != JTokenType.Null) { SendGuid = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Notify", out token) && token.Type != JTokenType.Null) { Notify = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("ThreadCount", out token) && token.Type != JTokenType.Null) { ThreadCount = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("ClientCreatedDate", out token) && token.Type != JTokenType.Null) { ClientCreatedDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ClientModifiedDate", out token) && token.Type != JTokenType.Null) { ClientModifiedDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as Item; if (typedSource != null) { Name = typedSource.Name; FileName = typedSource.FileName; Creator = typedSource.Creator; Parent = typedSource.Parent; AccessControls = typedSource.AccessControls; Zone = typedSource.Zone; CreationDate = typedSource.CreationDate; ProgenyEditDate = typedSource.ProgenyEditDate; ClientCreatedDate = typedSource.ClientCreatedDate; ClientModifiedDate = typedSource.ClientModifiedDate; ExpirationDate = typedSource.ExpirationDate; Description = typedSource.Description; DiskSpaceLimit = typedSource.DiskSpaceLimit; IsHidden = typedSource.IsHidden; BandwidthLimitInMB = typedSource.BandwidthLimitInMB; Owner = typedSource.Owner; Account = typedSource.Account; FileSizeInKB = typedSource.FileSizeInKB; Path = typedSource.Path; CreatorFirstName = typedSource.CreatorFirstName; CreatorLastName = typedSource.CreatorLastName; ExpirationDays = typedSource.ExpirationDays; FileSizeBytes = typedSource.FileSizeBytes; PreviewStatus = typedSource.PreviewStatus; PreviewPlatformsSupported = typedSource.PreviewPlatformsSupported; MaxPreviewSize = typedSource.MaxPreviewSize; HasPendingDeletion = typedSource.HasPendingDeletion; AssociatedFolderTemplateID = typedSource.AssociatedFolderTemplateID; IsTemplateOwned = typedSource.IsTemplateOwned; HasPermissionInfo = typedSource.HasPermissionInfo; State = typedSource.State; StreamID = typedSource.StreamID; CreatorNameShort = typedSource.CreatorNameShort; HasMultipleVersions = typedSource.HasMultipleVersions; Metadata = typedSource.Metadata; ESignatureDocument = typedSource.ESignatureDocument; } else { JToken token; if (source.TryGetProperty("Name", out token) && token.Type != JTokenType.Null) { Name = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("FileName", out token) && token.Type != JTokenType.Null) { FileName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Creator", out token) && token.Type != JTokenType.Null) { Creator = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("Parent", out token) && token.Type != JTokenType.Null) { Parent = (Item)serializer.Deserialize(token.CreateReader(), typeof(Item)); } if (source.TryGetProperty("AccessControls", out token) && token.Type != JTokenType.Null) { AccessControls = (IEnumerable <AccessControl>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <AccessControl>)); } if (source.TryGetProperty("Zone", out token) && token.Type != JTokenType.Null) { Zone = (Zone)serializer.Deserialize(token.CreateReader(), typeof(Zone)); } if (source.TryGetProperty("CreationDate", out token) && token.Type != JTokenType.Null) { CreationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ProgenyEditDate", out token) && token.Type != JTokenType.Null) { ProgenyEditDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ClientCreatedDate", out token) && token.Type != JTokenType.Null) { ClientCreatedDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ClientModifiedDate", out token) && token.Type != JTokenType.Null) { ClientModifiedDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("ExpirationDate", out token) && token.Type != JTokenType.Null) { ExpirationDate = (DateTime?)serializer.Deserialize(token.CreateReader(), typeof(DateTime?)); } if (source.TryGetProperty("Description", out token) && token.Type != JTokenType.Null) { Description = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("DiskSpaceLimit", out token) && token.Type != JTokenType.Null) { DiskSpaceLimit = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("IsHidden", out token) && token.Type != JTokenType.Null) { IsHidden = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("BandwidthLimitInMB", out token) && token.Type != JTokenType.Null) { BandwidthLimitInMB = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("Owner", out token) && token.Type != JTokenType.Null) { Owner = (User)serializer.Deserialize(token.CreateReader(), typeof(User)); } if (source.TryGetProperty("Account", out token) && token.Type != JTokenType.Null) { Account = (Account)serializer.Deserialize(token.CreateReader(), typeof(Account)); } if (source.TryGetProperty("FileSizeInKB", out token) && token.Type != JTokenType.Null) { FileSizeInKB = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("Path", out token) && token.Type != JTokenType.Null) { Path = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreatorFirstName", out token) && token.Type != JTokenType.Null) { CreatorFirstName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreatorLastName", out token) && token.Type != JTokenType.Null) { CreatorLastName = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("ExpirationDays", out token) && token.Type != JTokenType.Null) { ExpirationDays = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("FileSizeBytes", out token) && token.Type != JTokenType.Null) { FileSizeBytes = (long?)serializer.Deserialize(token.CreateReader(), typeof(long?)); } if (source.TryGetProperty("PreviewStatus", out token) && token.Type != JTokenType.Null) { PreviewStatus = (SafeEnum <PreviewStatus>)serializer.Deserialize(token.CreateReader(), typeof(SafeEnum <PreviewStatus>)); } if (source.TryGetProperty("PreviewPlatformsSupported", out token) && token.Type != JTokenType.Null) { PreviewPlatformsSupported = (IEnumerable <PreviewPlatformInfo>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <PreviewPlatformInfo>)); } if (source.TryGetProperty("MaxPreviewSize", out token) && token.Type != JTokenType.Null) { MaxPreviewSize = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("HasPendingDeletion", out token) && token.Type != JTokenType.Null) { HasPendingDeletion = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("AssociatedFolderTemplateID", out token) && token.Type != JTokenType.Null) { AssociatedFolderTemplateID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("IsTemplateOwned", out token) && token.Type != JTokenType.Null) { IsTemplateOwned = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("HasPermissionInfo", out token) && token.Type != JTokenType.Null) { HasPermissionInfo = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("State", out token) && token.Type != JTokenType.Null) { State = (int?)serializer.Deserialize(token.CreateReader(), typeof(int?)); } if (source.TryGetProperty("StreamID", out token) && token.Type != JTokenType.Null) { StreamID = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CreatorNameShort", out token) && token.Type != JTokenType.Null) { CreatorNameShort = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("HasMultipleVersions", out token) && token.Type != JTokenType.Null) { HasMultipleVersions = (bool?)serializer.Deserialize(token.CreateReader(), typeof(bool?)); } if (source.TryGetProperty("Metadata", out token) && token.Type != JTokenType.Null) { Metadata = (IEnumerable <Metadata>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <Metadata>)); } if (source.TryGetProperty("ESignatureDocument", out token) && token.Type != JTokenType.Null) { ESignatureDocument = (ESignature)serializer.Deserialize(token.CreateReader(), typeof(ESignature)); } } }
public override void Copy(ODataObject source, JsonSerializer serializer) { if (source == null || serializer == null) { return; } base.Copy(source, serializer); var typedSource = source as ShareRequestParams; if (typedSource != null) { FolderId = typedSource.FolderId; FolderPath = typedSource.FolderPath; Emails = typedSource.Emails; Subject = typedSource.Subject; Body = typedSource.Body; CcSender = typedSource.CcSender; RequireLogin = typedSource.RequireLogin; ExpirationDays = typedSource.ExpirationDays; NotifyOnUpload = typedSource.NotifyOnUpload; IsViewOnly = typedSource.IsViewOnly; } else { JToken token; if (source.TryGetProperty("FolderId", out token) && token.Type != JTokenType.Null) { FolderId = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("FolderPath", out token) && token.Type != JTokenType.Null) { FolderPath = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Emails", out token) && token.Type != JTokenType.Null) { Emails = (IEnumerable <string>)serializer.Deserialize(token.CreateReader(), typeof(IEnumerable <string>)); } if (source.TryGetProperty("Subject", out token) && token.Type != JTokenType.Null) { Subject = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("Body", out token) && token.Type != JTokenType.Null) { Body = (string)serializer.Deserialize(token.CreateReader(), typeof(string)); } if (source.TryGetProperty("CcSender", out token) && token.Type != JTokenType.Null) { CcSender = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("RequireLogin", out token) && token.Type != JTokenType.Null) { RequireLogin = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("ExpirationDays", out token) && token.Type != JTokenType.Null) { ExpirationDays = (int)serializer.Deserialize(token.CreateReader(), typeof(int)); } if (source.TryGetProperty("NotifyOnUpload", out token) && token.Type != JTokenType.Null) { NotifyOnUpload = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } if (source.TryGetProperty("IsViewOnly", out token) && token.Type != JTokenType.Null) { IsViewOnly = (bool)serializer.Deserialize(token.CreateReader(), typeof(bool)); } } }