当前位置: 首页>>代码示例>>C#>>正文


C# ICustomer.SerializeToXml方法代码示例

本文整理汇总了C#中ICustomer.SerializeToXml方法的典型用法代码示例。如果您正苦于以下问题:C# ICustomer.SerializeToXml方法的具体用法?C# ICustomer.SerializeToXml怎么用?C# ICustomer.SerializeToXml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICustomer的用法示例。


在下文中一共展示了ICustomer.SerializeToXml方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReindexCustomer

 ///// <summary>
 ///// Searches CustomerIndex by first name, last name, login name and email address for the 'term' passed
 ///// </summary>
 ///// <param name="term">Searches the customer index for a term</param>
 ///// <returns>A collection of <see cref="CustomerDisplay"/></returns>
 //public static IEnumerable<CustomerDisplay> Search(string term)
 //{
 //    var criteria = ExamineManager.Instance.CreateSearchCriteria();
 //    criteria.GroupedOr(
 //        new[] { "loginName", "firstName", "lastName", "email" },
 //        term.ToSearchTerms().Select(x => x.SearchTermType == SearchTermType.SingleWord ? x.Term.Fuzzy() : x.Term.MultipleCharacterWildcard()).ToArray());
 //    return Search(criteria);
 //}
 ///// <summary>
 ///// Searches CustomerIndex using <see cref="ISearchCriteria"/> passed
 ///// </summary>
 ///// <param name="criteria">
 ///// The criteria.
 ///// </param>
 ///// <returns>
 ///// A collection of <see cref="CustomerDisplay"/>
 ///// </returns>
 //public static IEnumerable<CustomerDisplay> Search(ISearchCriteria criteria)
 //{
 //    return ExamineManager.Instance.SearchProviderCollection[SearcherName]
 //        .Search(criteria).OrderByDescending(x => x.Score)
 //        .Select(result => result.ToCustomerDisplay());
 //}
 /// <summary>
 /// Re-indexes a customer.
 /// </summary>
 /// <param name="customer">
 /// The customer to re-index
 /// </param>
 private static void ReindexCustomer(ICustomer customer)
 {
     ExamineManager.Instance.IndexProviderCollection[IndexName]
         .ReIndexNode(customer.SerializeToXml().Root, IndexTypes.Customer);
 }
开发者ID:ProNotion,项目名称:Merchello,代码行数:39,代码来源:CustomerQuery.cs

示例2: AddCustomerToIndex

 /// <summary>
 /// Adds the customer to the index
 /// </summary>
 /// <param name="customer">The <see cref="ICustomer"/> to be indexed</param>
 /// <remarks>For testing</remarks>
 internal void AddCustomerToIndex(ICustomer customer)
 {
     var nodes = new List<XElement> { customer.SerializeToXml().Root };
     AddNodesToIndex(nodes, IndexTypes.Customer);
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:10,代码来源:CustomerIndexer.cs


注:本文中的ICustomer.SerializeToXml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。