public SearchExternalLoginRequestBuilder(SearchProviderType searchSource, string userName, string password) : this() { this.SearchSource = searchSource; this.UserName = userName; this.Password = password; }
public MediaEntry(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "mediaType": this._MediaType = (MediaType)ParseEnum(typeof(MediaType), propertyNode.InnerText); continue; case "conversionQuality": this._ConversionQuality = propertyNode.InnerText; continue; case "sourceType": this._SourceType = (SourceType)StringEnum.Parse(typeof(SourceType), propertyNode.InnerText); continue; case "searchProviderType": this._SearchProviderType = (SearchProviderType)ParseEnum(typeof(SearchProviderType), propertyNode.InnerText); continue; case "searchProviderId": this._SearchProviderId = propertyNode.InnerText; continue; case "creditUserName": this._CreditUserName = propertyNode.InnerText; continue; case "creditUrl": this._CreditUrl = propertyNode.InnerText; continue; case "mediaDate": this._MediaDate = ParseInt(propertyNode.InnerText); continue; case "dataUrl": this._DataUrl = propertyNode.InnerText; continue; case "flavorParamsIds": this._FlavorParamsIds = propertyNode.InnerText; continue; case "isTrimDisabled": this._IsTrimDisabled = (NullableBoolean)ParseEnum(typeof(NullableBoolean), propertyNode.InnerText); continue; case "streams": this._Streams = new List <StreamContainer>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Streams.Add(ObjectFactory.Create <StreamContainer>(arrayNode)); } continue; } } }
public Search(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "keyWords": this._KeyWords = propertyNode.InnerText; continue; case "searchSource": this._SearchSource = (SearchProviderType)ParseEnum(typeof(SearchProviderType), propertyNode.InnerText); continue; case "mediaType": this._MediaType = (MediaType)ParseEnum(typeof(MediaType), propertyNode.InnerText); continue; case "extraData": this._ExtraData = propertyNode.InnerText; continue; case "authData": this._AuthData = propertyNode.InnerText; continue; } } }
public MediaEntry(JToken node) : base(node) { if (node["mediaType"] != null) { this._MediaType = (MediaType)ParseEnum(typeof(MediaType), node["mediaType"].Value <string>()); } if (node["conversionQuality"] != null) { this._ConversionQuality = node["conversionQuality"].Value <string>(); } if (node["sourceType"] != null) { this._SourceType = (SourceType)StringEnum.Parse(typeof(SourceType), node["sourceType"].Value <string>()); } if (node["sourceVersion"] != null) { this._SourceVersion = node["sourceVersion"].Value <string>(); } if (node["searchProviderType"] != null) { this._SearchProviderType = (SearchProviderType)ParseEnum(typeof(SearchProviderType), node["searchProviderType"].Value <string>()); } if (node["searchProviderId"] != null) { this._SearchProviderId = node["searchProviderId"].Value <string>(); } if (node["creditUserName"] != null) { this._CreditUserName = node["creditUserName"].Value <string>(); } if (node["creditUrl"] != null) { this._CreditUrl = node["creditUrl"].Value <string>(); } if (node["mediaDate"] != null) { this._MediaDate = ParseInt(node["mediaDate"].Value <string>()); } if (node["dataUrl"] != null) { this._DataUrl = node["dataUrl"].Value <string>(); } if (node["flavorParamsIds"] != null) { this._FlavorParamsIds = node["flavorParamsIds"].Value <string>(); } if (node["isTrimDisabled"] != null) { this._IsTrimDisabled = (NullableBoolean)ParseEnum(typeof(NullableBoolean), node["isTrimDisabled"].Value <string>()); } if (node["streams"] != null) { this._Streams = new List <StreamContainer>(); foreach (var arrayNode in node["streams"].Children()) { this._Streams.Add(ObjectFactory.Create <StreamContainer>(arrayNode)); } } }
private void Initialize() { if (_initialized) { return; } _searchManager = new SearchManager(AppContext.Current.ApplicationName); _searchProviderType = LoadSearchProvider(); _initialized = true; }
private void Initialize() { if (_initialized) { return; } _searchManager = new SearchManager(Mediachase.Commerce.Core.AppContext.Current.ApplicationName); _searchProviderType = LoadSearchProvider(); _initialized = true; }
public static SearchProvider GetSearchProvider(SearchProviderType searchProviderType, string sourceText) { switch (searchProviderType) { case SearchProviderType.ExactSearchProvider: return(new ExactSearchProvider(sourceText)); default: throw new ArgumentException($"SearchProvider with value {searchProviderType} doesn't exist"); } }
public Search(JToken node) : base(node) { if (node["keyWords"] != null) { this._KeyWords = node["keyWords"].Value <string>(); } if (node["searchSource"] != null) { this._SearchSource = (SearchProviderType)ParseEnum(typeof(SearchProviderType), node["searchSource"].Value <string>()); } if (node["mediaType"] != null) { this._MediaType = (MediaType)ParseEnum(typeof(MediaType), node["mediaType"].Value <string>()); } if (node["extraData"] != null) { this._ExtraData = node["extraData"].Value <string>(); } if (node["authData"] != null) { this._AuthData = node["authData"].Value <string>(); } }
public static SearchExternalLoginRequestBuilder ExternalLogin(SearchProviderType searchSource, string userName, string password) { return(new SearchExternalLoginRequestBuilder(searchSource, userName, password)); }
protected SearchProvider(SearchProviderType providerType, string sourceText) { _providerType = providerType; _sourceText = sourceText.ToLower(); }