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


C# ICategory类代码示例

本文整理汇总了C#中ICategory的典型用法代码示例。如果您正苦于以下问题:C# ICategory类的具体用法?C# ICategory怎么用?C# ICategory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: OnCategoryDeleted

 public void OnCategoryDeleted(ICategory category)
 {
     if (CategoryDeleted != null)
     {
         CategoryDeleted(new SingleItemEventArgs<ICategory>(category));
     }        
 }
开发者ID:vivekmalikymca,项目名称:BetterCMS,代码行数:7,代码来源:CategoryEvents.cs

示例2: Rule

 public Rule(ICategory applyCategory, IAction action, ICondition condition, string name)
 {
     m_condition = condition;
     m_action = action;
     m_applyCategory = applyCategory;
     m_name = name;
 }
开发者ID:dbremner,项目名称:clrinterop,代码行数:7,代码来源:Rule.cs

示例3: GetTemplateBindsForCategory

        public IEnumerable<ITemplateBind> GetTemplateBindsForCategory(ICategory category)
        {
            //ITemplateBind bind;

            //bind = this.GetBind(TemplateBindType.CategoryTemplate, category.ID);

            //如果栏目不存在绑定,则查找模块的绑定
            //if (false || bind == null)
            //{
            //    int moduleID = cbll.Get(a => a.ID == categoryID).ModuleID;
            //    bind = GetBind(TemplateBindType.ModuleCategoryTemplate, moduleID.ToString());
            //}

               ITemplateBind bind=  this.GetBind(TemplateBindType.CategoryTemplate, category.Id);

               if (bind != null) yield return bind;
               bind= this.GetBind(TemplateBindType.CategoryArchiveTemplate, category.Id);
               if (bind != null) yield return bind;

            /*

            IDictionary<TemplateBindType, ITemplateBind> templates = new Dictionary<TemplateBindType, ITemplateBind>();
            if (bind != null)
            {
                templates.Add(TemplateBindType.CategoryTemplate, bind);
            }

            if (bindArchive != null)
            {
                templates.Add(TemplateBindType.CategoryArchiveTemplate, bindArchive);
            }
            return templates;
            */
        }
开发者ID:hanson-huang,项目名称:cms,代码行数:34,代码来源:TemplateRepository.cs

示例4: PopulateFrom

		public void PopulateFrom(ICategory input) {
			this.Description = input.Description;
			this.ParentCategoryId = input.ParentCategoryId;
			this.PictureId = input.PictureId;
			this.DisplayOrder = input.DisplayOrder;
			this.Published = input.Published;
			this.Deleted = input.Deleted;
			this.CreatedOnUtc = input.CreatedOnUtc;
			this.UpdatedOnUtc = input.UpdatedOnUtc;
			this.CategoryTemplateId = input.CategoryTemplateId;
			this.MetaKeywords = input.MetaKeywords;
			this.MetaDescription = input.MetaDescription;
			this.MetaTitle = input.MetaTitle;
			this.PageSize = input.PageSize;
			this.AllowCustomersToSelectPageSize = input.AllowCustomersToSelectPageSize;
			this.PageSizeOptions = input.PageSizeOptions;
			this.PriceRanges = input.PriceRanges;
			this.ShowOnHomePage = input.ShowOnHomePage;
			this.IncludeInTopMenu = input.IncludeInTopMenu;
			this.HasDiscountsApplied = input.HasDiscountsApplied;
			this.SubjectToAcl = input.SubjectToAcl;
			this.LimitedToStores = input.LimitedToStores;
			this.Name = input.Name;
			this.ID = input.ID;
			this.ID = input.ID;
		}
开发者ID:jasonholloway,项目名称:brigita,代码行数:26,代码来源:ScopedCategory1.cs

示例5: HomeController

 public HomeController(ICategory catsvc,IProduct prodsvc,ICart cartsvc, ICheckout checkoutsvc, ICommon commonsvc)
 {
     _categoryService = catsvc;
     _productService = prodsvc;
     _cartService = cartsvc;
     _checkoutService = checkoutsvc;
     _commonService = commonsvc;
 }
开发者ID:czechdude,项目名称:Meshop,代码行数:8,代码来源:HomeController.cs

示例6: GetCellValue

        private string GetCellValue(ICategory phase)
        {
            if (phase == null || phase.Contributions == null) return string.Empty;

            int count = phase.Contributions.Select(x => x.Contributor).Distinct().Count();
            if (count <= 0) return string.Empty;
            return count.ToString();
        }
开发者ID:JaGTM,项目名称:QuirkyScraper,代码行数:8,代码来源:PhaseUniqueContributorsProcessor.cs

示例7: AddContribution

        public void AddContribution(ICategory contributionProject)
        {
            var list = (Contributions as List<ICategory>);

            // Don't add duplicates
            if (list.Any(x => x.Name == contributionProject.Name && x.URL == contributionProject.URL)) return;
            list.Add(contributionProject);
        }
开发者ID:JaGTM,项目名称:QuirkyScraper,代码行数:8,代码来源:People.cs

示例8: Post

 public Post(IUser userRepository, ICategory categoryRepository, ITag tagRepository, IComment commentRepository)
 {
     _postsTable = context.GetTable<PostEntity>();
     _commentRepository = commentRepository;
     _tagRepository = tagRepository;
     _categoryRepository = categoryRepository;
     _userRepository = userRepository;
 }
开发者ID:rinckd,项目名称:sblog.net,代码行数:8,代码来源:Post.cs

示例9: Equals

 public bool Equals(ICategory other)
 {
     if (ReferenceEquals(this, other))
         return true;
     if (other == null)
         return false;
     return this.EventType == other.EventType && this.Name == other.Name;
 }
开发者ID:unsliced,项目名称:head-race-management,代码行数:8,代码来源:BaseCategory.cs

示例10: HomeController

 public HomeController(IPost postRepository, IUser userRepository, ICategory categoryRepository, ITag tagRepository, ISettings settingsRepository, ICacheService cacheService)
     : base (settingsRepository)
 {
     _postRepository = postRepository;
     _userRepository = userRepository;
     _categoryRepository = categoryRepository;
     _tagRepository = tagRepository;
     _cacheService = cacheService;
 }
开发者ID:rinckd,项目名称:sblog.net,代码行数:9,代码来源:HomeController.cs

示例11: Item

 public Item(string name, decimal price, string description, string size, ICategory category, IImage img = null)
 {
     this.Name = name;
     this.Img = img;
     this.Price = price;
     this.Description = description;
     this.Size = size;
     this.Category = category;
 }
开发者ID:nok32,项目名称:WebStore,代码行数:9,代码来源:Item.cs

示例12: Init

        public void Init(ICategory category)
        {
            if (!category.Engine.CanBeClassify)
            {
                throw new CannotBeClassifyException("Class must be prepared to classification firstly.");
            }

            this._category = category;
        }
开发者ID:spolnik,项目名称:NaiveBayesProject,代码行数:9,代码来源:Classifer.cs

示例13: InitContext

 public static void InitContext()
 {
     if (InitEvent != null)
     {
             CategoryService = InitEvent(typeof(ICategory)) as ICategory;         
             PostService = InitEvent(typeof(IPost)) as IPost;         
             PostTagMapService = InitEvent(typeof(IPostTagMap)) as IPostTagMap;         
             TagService = InitEvent(typeof(ITag)) as ITag;         
     }
 }
开发者ID:sdhjl2000,项目名称:dealerblog,代码行数:10,代码来源:BusinessContext.cs

示例14: GetProbabilities

        private static void GetProbabilities(ITargetObject titanicPassenger, ICategory category, out double survivedProbability, out double notSurvivedProbability)
        {
            IClassifer classifer = new Classifer();
            classifer.Init(category);

            Dictionary<string, double> classification = classifer.GetClassification(titanicPassenger);

            survivedProbability = classification["Edible"];
            notSurvivedProbability = classification["Poisonous"];
        }
开发者ID:spolnik,项目名称:NaiveBayesProject,代码行数:10,代码来源:MushroomClassification.cs

示例15: GetCanonicalUrl

		public string GetCanonicalUrl(ICategory category)
		{
			var productCategoryUrl = category.UrlName;
			while (category.Parent != null)
			{
				category = category.Parent;
				productCategoryUrl = string.Format("{0}/{1}", category.UrlName, productCategoryUrl);
			}
			return productCategoryUrl;
		}
开发者ID:Chuhukon,项目名称:uWebshop-Releases,代码行数:10,代码来源:CategoryCatalogUrlService.cs


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