/// <summary> /// Disposes of the search context if appropriate. /// </summary> public void Dispose() { if (this._searchContext != null && ((!this._disposeOfSearchContext.HasValue) || this._disposeOfSearchContext.Value)) { this._searchContext.Dispose(); this._searchContext = null; } }
/// <summary> /// Initializes a new instance of the <see cref="DataSourceHelper"/> class. /// </summary> /// <param name="dataSource">The string data source passed to the presentation component. /// </param> /// <param name="contextItem">The context item for relative paths and specifying the /// database from which to retrieve other items. /// </param> /// <param name="searchContext">The search context. /// </param> public DataSourceHelper( string dataSource, SC.Data.Items.Item contextItem, CS.IProviderSearchContext searchContext = null) { this.RawDataSource = dataSource; this.ContextItem = contextItem; this.SearchContext = searchContext; }
public GetPresentationDataSourcesArgs( string dataSource, SC.Data.Items.Item contextItem, bool storeUISearchResults, bool storeSearchResultIDs, CS.IProviderSearchContext searchContext) { Assert.ArgumentNotNull(contextItem, "contextItem"); this.RawDataSource = dataSource; this.ContextItem = contextItem; this.StoreUISearchResults = storeUISearchResults; this.StoreSearchResultIDs = storeSearchResultIDs; this.SearchContext = searchContext; }