ClientUI.ViewModel.ObservableConnection.SearchRecords C# (CSharp) Method

SearchRecords() private method

private SearchRecords ( string term, Action callback, string entityType ) : void
term string
callback Action
entityType string
return void
        private void SearchRecords(string term, Action<EntityCollection> callback, string entityType)
        {
            string fetchXml = _queryParser.GetFetchXmlForQuery(entityType,"QuickFind", term, SearchTermOptions.PrefixWildcard | SearchTermOptions.SuffixWildcard);

            OrganizationServiceProxy.BeginRetrieveMultiple(fetchXml, delegate(object result)
            {

                EntityCollection fetchResult = OrganizationServiceProxy.EndRetrieveMultiple(result, typeof(Entity));
                fetchResult.EntityName = entityType;
                callback(fetchResult);
            });
        }