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


C# System.Item类代码示例

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


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

示例1: DiffItemVersionedFile

 public DiffItemVersionedFile(Item item, VersionSpec versionSpec)
 {
     this.versionControlServer = item.VersionControlServer;
         this.item = item;
         this.versionSpec = versionSpec;
         this.label = item.ServerItem;
 }
开发者ID:Jeff-Lewis,项目名称:opentf,代码行数:7,代码来源:DiffItemVersionedFile.cs

示例2: DiffFile

 public DiffFile(string name) {
     Name = name;
     LeftItem = new Item();
     LeftItem.LoadInfo += LoadInfo;
     RightItem = new Item();
     RightItem.LoadInfo += LoadInfo;
 }
开发者ID:t-kojima,项目名称:VideoPackageExplorer,代码行数:7,代码来源:DiffFile.cs

示例3: UpdateItem

        public void UpdateItem(Item item)
        {
            item.SellIn -= 1;
            item.Quality += item.GetQualityChange();

            item.Quality = Math.Min(ItemConstants.MaximumQuality, item.Quality);
        }
开发者ID:npizzolato,项目名称:GIldedRose,代码行数:7,代码来源:BrieUpdater.cs

示例4: Loading_OnLoadingComplete

        public static void Loading_OnLoadingComplete(EventArgs args)
        {
            if (Variables._Player.Hero != Champion.Draven)
            {
                return;
            }

            Q = new Spell.Active(SpellSlot.Q, (uint) Variables._Player.GetAutoAttackRange());
            W = new Spell.Active(SpellSlot.W);
            E = new Spell.Skillshot(SpellSlot.E, 1050, SkillShotType.Linear);
            R = new Spell.Skillshot(SpellSlot.R, 2000, SkillShotType.Linear);

            var slot = Variables._Player.GetSpellSlotFromName("summonerdot");
            if (slot != SpellSlot.Unknown)
            {
                Ignite = new Spell.Targeted(slot, 600);
            }

            Variables.QReticles = new List<Variables.QRecticle>();

            Qss = new Item((int) ItemId.Quicksilver_Sash);
            Mercurial = new Item((int) ItemId.Mercurial_Scimitar);

            Variables.abilitySequence = new[] { 1, 3, 2, 1, 1, 4, 1, 3, 1, 3, 4, 3, 3, 2, 2, 4, 2, 2 };

            EventManager.load();
            MenuManager.Load();
        }
开发者ID:Connerthorpe,项目名称:EloBuddy,代码行数:28,代码来源:Program.cs

示例5: AddSpecialFields

 protected override void AddSpecialFields(Document document, Item item)
 {
     Assert.ArgumentNotNull(document, "document");
     Assert.ArgumentNotNull(item, "item");
     document.Add(this.CreateTextField(BuiltinFields.Name, item.Name));
     document.Add(this.CreateDataField(BuiltinFields.Name, item.Name));
     this.DetectRemovalFilterAndProcess(document, item, "DisplayName", BuiltinFields.Name, (itm) => item.Appearance.DisplayName);
     this.DetectRemovalFilterValueField(document, item, "Icon", BuiltinFields.Icon, itm => itm.Appearance.Icon);
     this.DetectRemovalFilterAndProcess(document, item, "Creator", BuiltinFields.Creator, itm => itm.Statistics.CreatedBy);
     this.DetectRemovalFilterAndProcess(document, item, "Editor", BuiltinFields.Editor, itm => itm.Statistics.UpdatedBy);
     this.DetectRemovalFilterAndProcess(document, item, "AllTemplates", BuiltinFields.AllTemplates, this.GetAllTemplates);
     this.DetectRemovalFilterAndProcess(document, item, "TemplateName", BuiltinFields.TemplateName, itm => itm.TemplateName);
     if (this.DetectRemoval("Hidden"))
     {
         if (this.IsHidden(item))
         {
             this.DetectRemovalFilterValueField(document, item, "Hidden", BuiltinFields.Hidden, itm => "1");
         }
     }
     this.DetectRemovalFilterValueField(document, item, "Created", BuiltinFields.Created, itm => item[FieldIDs.Created]);
     this.DetectRemovalFilterValueField(document, item, "Updated", BuiltinFields.Updated, itm => item[FieldIDs.Updated]);
     this.DetectRemovalFilterAndProcess(document, item, "Path", BuiltinFields.Path, this.GetItemPath);
     this.DetectRemovalFilterAndProcess(document, item, "Links", BuiltinFields.Links, this.GetItemLinks);
     var tags = this.Tags;
     if (tags.Length > 0)
     {
         document.Add(this.CreateTextField(BuiltinFields.Tags, tags));
         document.Add(this.CreateDataField(BuiltinFields.Tags, tags));
     }
 }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:30,代码来源:Crawler.cs

示例6: CountItemPathDuplicates

 public int CountItemPathDuplicates(Item item)
 {
     return item.Parent.Children.Where<Item>(delegate(Item x)
     {
         return (x.Name == item.Name);
     }).Count<Item>();
 }
开发者ID:Warunika,项目名称:SitecorePollModule,代码行数:7,代码来源:PollEventHandler.cs

示例7: CreateOrders2

 public static Batch CreateOrders2()
 {
     var b = new Batch();
     var o = new PurchaseOrder();
     o.CustId = "0815";
     var i = new Item();
     i.ProdId = "1234";
     i.Price = 37;
     i.Quantity = 2;
     o.Item.Add(i);
     i = new Item();
     i.ProdId = "5678";
     i.Price = 1.5;
     i.Quantity = 3;
     o.Item.Add(i);
     b.PurchaseOrder.Add(o);
     o = new PurchaseOrder();
     o.CustId = "1324";
     i = new Item();
     i.ProdId = "7788";
     i.Price = 42;
     i.Quantity = 1;
     b.PurchaseOrder.Add(o);
     return b;
 }
开发者ID:dipdapdop,项目名称:linqtoxsd,代码行数:25,代码来源:Total.cs

示例8: FeedDetailsViewModel

        public FeedDetailsViewModel()
        {
            RootChannel = new Channel();
            RootChannel.Title = "Titre du channel";
            RootChannel.Description =   "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet eleifend ante." +
                                        "In vel mauris metus, ac viverra lectus. Aenean dui sapien, pretium eu gravida ut, sollicitudin" +
                                        "et nisi. In hac habitasse platea dictumst. Quisque egestas ligula in lorem sodales sed" +
                                        " congue turpis varius. Maecenas vel quam at tortor viverra tristique vitae at lorem. Maecenas" +
                                        " augue augue, convallis tristique congue ut, porta sed felis. Nam nisi libero, vehicula" +
                                        " ac ultricies quis, imperdiet lobortis tellus.";
            RootChannel.Link = "http://www.google.com";

            Items = new List<Item>();
            for (int i = 0; i < 20; ++i)
            {
                Item item = new Item();
                item.Title = "Titre de l'item " + i.ToString();
                item.Description =  "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet eleifend ante." +
                                    "In vel mauris metus, ac viverra lectus. Aenean dui sapien, pretium eu gravida ut, sollicitudin" +
                                    "et nisi. In hac habitasse platea dictumst. Quisque egestas ligula in lorem sodales sed" +
                                    " congue turpis varius. Maecenas vel quam at tortor viverra tristique vitae at lorem. Maecenas" +
                                    " augue augue, convallis tristique congue ut, porta sed felis. Nam nisi libero, vehicula" +
                                    " ac ultricies quis, imperdiet lobortis tellus.";
                item.PubDate = DateTime.Now;
                Items.Add(item);

            }

            ReadItem = new RelayCommand((param) => ReadItemBody(param as Item));
            //feedDetailsDataModel = new FeedDetailsDataModel();
        }
开发者ID:Pamilator,项目名称:Server-Based-RSS-Feed-Aggregator-,代码行数:31,代码来源:FeedDetailsViewModel.cs

示例9: GetMatchingChildItem

 public override IEnumerable<Item> GetMatchingChildItem(BaseDataMap map, Item listParent, string importValue)
 {
     IEnumerable<Item> t = (from Item c in listParent.GetChildren()
                            where c[MatchOnFieldName].ToLower().Equals(importValue.ToLower())
                            select c).ToList();
     return t;
 }
开发者ID:NetlabSharedSource,项目名称:SitecoreUserSync,代码行数:7,代码来源:ToGuidFromListValueMatchOnFieldNameField.cs

示例10: ConstantAttribute

 public ConstantAttribute(Item owner, int attributeID, string attributeName, double value)
 {
     Owner = owner;
     AttributeID = attributeID;
     AttributeName = attributeName;
     Value = value;
 }
开发者ID:rischwa,项目名称:eve-fast-fitting-assessment,代码行数:7,代码来源:ConstantAttribute.cs

示例11: ResolveValue

        public override string ResolveValue(Item item)
        {
            var result = new StringBuilder();

            // Get all renderings
            foreach (var reference in item.Visualization.GetRenderings(Sitecore.Data.Items.DeviceItem.ResolveDevice(item.Database), false))
            {
                // Get the source item
                if (reference.RenderingItem != null && !string.IsNullOrEmpty(reference.Settings.DataSource))
                {
                    var source = item.Database.GetItem(reference.Settings.DataSource);
                    if (source != null)
                    {
                        // Go through all fields
                        foreach (Field field in source.Fields)
                        {
                            result.Append(GetFieldValue(field));
                            result.Append(" ");
                        }
                    }
                }
            }

            return result.ToString();
        }
开发者ID:sitecorian,项目名称:pageeditor-unleashed,代码行数:25,代码来源:VisualizationField.cs

示例12: CreateBasicUnsortedList

 private Item[] CreateBasicUnsortedList()
 {
     var b = new Item("B", new Item("A", null));
     var d = new Item("E", new Item("C", new Item("D", null)));
     var f = new Item("F", new Item("A"));
     return new[] { b, d, f };
 }
开发者ID:compuguy24,项目名称:1800Contacts,代码行数:7,代码来源:TopologicalSortTests.cs

示例13: IsMatch

        public bool IsMatch()
        {
            if (conditionFunc == null)
            {
                conditionFunc = ScriptManager.GetCondition(Condition);
            }

            if (BaitItem == null)
            {
                if (Id > 0)
                {
                    BaitItem = DataManager.ItemCache[Id];
                }
                else if (!string.IsNullOrWhiteSpace(Name))
                {
                    BaitItem =
                        DataManager.ItemCache.Values.Find(
                            i => string.Equals(i.EnglishName, Name, StringComparison.InvariantCultureIgnoreCase)
                                || string.Equals(i.CurrentLocaleName, Name, StringComparison.InvariantCultureIgnoreCase));
                }
            }

            if (BaitItem == null || BaitItem.ItemCount() == 0)
            {
                return false;
            }

            return conditionFunc();
        }
开发者ID:juliankoehn,项目名称:ExBuddy,代码行数:29,代码来源:Bait.cs

示例14: Init

        protected override void Init(MyObjectBuilder_DefinitionBase ob)
        {
            base.Init(ob);

            MyObjectBuilder_BlueprintDefinition builder = (MyObjectBuilder_BlueprintDefinition)ob;

            Prerequisites = new Item[builder.Prerequisites.Length];
            for (int i = 0; i < Prerequisites.Length; ++i)
            {
                Prerequisites[i] = Item.FromObjectBuilder(builder.Prerequisites[i]);
            }
            if (builder.Result != null)
            {
                Results = new Item[1];
                Results[0] = Item.FromObjectBuilder(builder.Result);
            }
            else
            {
                Results = new Item[builder.Results.Length];
                for (int i = 0; i < Results.Length; ++i)
                {
                    Results[i] = Item.FromObjectBuilder(builder.Results[i]);
                }
            }
            BaseProductionTimeInSeconds = builder.BaseProductionTimeInSeconds;
            PostprocessNeeded = true;
            ProgressBarSoundCue = builder.ProgressBarSoundCue;
        }
开发者ID:2asoft,项目名称:SpaceEngineers,代码行数:28,代码来源:MyBlueprintDefinition.cs

示例15: Form1_Load

        private void Form1_Load(object sender, EventArgs e)
        {
            Debug.Logger = this;
            //bool useNamespace = false;
            env = new CSLE.CLS_Environment(this);//如果要启用命名空间,第二个参数要打开
            TestReg.Reg(env);
         
            //查找所有脚本文件
            string[] dirs = System.IO.Directory.GetDirectories("script");

            foreach (var d in dirs)
            {
                try
                {
                    Item i = new Item();
                    i.path = d;
                    i.test = System.IO.File.ReadAllText(d + "/test.txt");

                    listItem.Items.Add(i);
                }
                catch (Exception err)
                {

                }
            }


        }
开发者ID:lightszero,项目名称:cslightcore,代码行数:28,代码来源:Form1.cs


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