• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ICategory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: TargetObject

        public TargetObject(ICategory category, string categoryType)
        {
            this.CategoryType = categoryType;
            this._variablesProbabilityMap = new AttributesCollection();

            foreach (string variableName in category.Attributes)
            {
                this._variablesProbabilityMap.Add(variableName);
            }
        }
开发者ID:spolnik,项目名称:NaiveBayesProject,代码行数:10,代码来源:TargetObject.cs


示例17: GetProbabilities

        private static void GetProbabilities(ITargetObject snowboardExpensiveFreestyleToClassify, ICategory category, out double beginnerProbability, out double mediumProbability, out double advancedProbability)
        {
            IClassifer classifer = new Classifer();
            classifer.Init(category);

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

            beginnerProbability = classification[category.CategoryTypes[TestCategoryFactory.BeginnerCategory]];
            mediumProbability = classification[category.CategoryTypes[TestCategoryFactory.MediumCategory]];
            advancedProbability = classification[category.CategoryTypes[TestCategoryFactory.AdvancedCategory]];
        }
开发者ID:spolnik,项目名称:NaiveBayesProject,代码行数:11,代码来源:TestDataLoader.cs


示例18: CategoryAdminController

        public CategoryAdminController(ICategory categoryRepository, IPost postRepository, ISettings settingsRepository)
            : base(settingsRepository)
        {
            _categoryRepository = categoryRepository;
            _postRepository = postRepository;
            ExpectedMasterName = string.Empty;

            _itemsPerPage = settingsRepository.ManageItemsPerPage;

            IsAdminController = true;
        }
开发者ID:kenchic,项目名称:sblog.net,代码行数:11,代码来源:CategoryAdminController.cs


示例19: AdminController

        public AdminController(IPost postRepository, IComment commentRepository, ICategory categoryRepository, ITag tagRepository, ISettings settingsRepository, IPathMapper pathMapper, IUser userRepository)
            : base(settingsRepository)
        {
            _postRepository = postRepository;
            _commentRepository = commentRepository;
            _categoryRepository = categoryRepository;
            _tagRepository = tagRepository;
            _pathMapper = pathMapper;
            _userRepository = userRepository;
            ExpectedMasterName = string.Empty;

            IsAdminController = true;
        }
开发者ID:LByron,项目名称:BS,代码行数:13,代码来源:AdminController.cs


示例20: TestClassifyAllMountainCheapAsBeginnerCategory

        private static void TestClassifyAllMountainCheapAsBeginnerCategory(ICategory category)
        {
            ITargetObject snowboardCheapAllMountainToClassify = new TargetObject(category, String.Empty);
            snowboardCheapAllMountainToClassify.SetAttributeExist(TestCategoryFactory.CategoryAttributes[TestCategoryFactory.AllMountain]);
            snowboardCheapAllMountainToClassify.SetAttributeExist(TestCategoryFactory.CategoryAttributes[TestCategoryFactory.Cheap]);

            double beginnerProbability, mediumProbability, advancedProbability;

            GetProbabilities(snowboardCheapAllMountainToClassify, category, out beginnerProbability, out mediumProbability, out advancedProbability);

            Assert.IsTrue(beginnerProbability > mediumProbability);
            Assert.IsTrue(beginnerProbability > advancedProbability);
        }
开发者ID:spolnik,项目名称:NaiveBayesProject,代码行数:13,代码来源:TestDataLoader.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICategoryRepository类代码示例发布时间:2022-05-24
下一篇:
C# ICatalog类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap