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


C# Collections类代码示例

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


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

示例1: Users_ItemsRemoved

 void Users_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<User>> e) {
   foreach (var u in e.Items) {
     if (u.Value.Id != Guid.Empty) {
       Content.DeleteUserAsync(u.Value, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
     }
   }
 }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:7,代码来源:RefreshableUserListView.cs

示例2: LoadObjectDefinitions

 /// <summary>
 /// Loads the object definitions.
 /// </summary>
 /// <param name="configurationModel">The configuration model.</param>
 public void LoadObjectDefinitions(Collections.Generic.ISet<ConfigurationClass> configurationModel)
 {
     foreach (ConfigurationClass configClass in configurationModel)
     {
         LoadObjectDefinitionsForConfigurationClass(configClass);
     }
 }
开发者ID:fgq841103,项目名称:spring-net,代码行数:11,代码来源:ConfigurationClassObjectDefinitionReader.cs

示例3: RandomGenR

 private RandomGenR()
 {
     this.dateModule = new Dates();
     this.numberModule = new Numbers();
     this.collectionsModule = new Collections();
     this.stringsModule = new Strings();
 }
开发者ID:KameliaZhelyazkova,项目名称:RandomR,代码行数:7,代码来源:RandomGenR.cs

示例4: SocketToken

        public SocketToken(int id,
            Sinan.Collections.BytesSegment receiveBuffer,
            Sinan.Collections.BytesSegment sendBuffer,
            IBufferProcessor processor,
            Collections.CircularQueue<Collections.BytesSegment> sendPool = null)
        {
            m_connectID = id;
            m_sendPool = sendPool ?? new Collections.CircularQueue<Collections.BytesSegment>(64);
            m_processor = processor;
            SocketAsyncEventArgs receiver = new SocketAsyncEventArgs();
            receiver.Completed += new EventHandler<SocketAsyncEventArgs>(ReceiveCompleted);
            receiver.SetBuffer(receiveBuffer.Array, receiveBuffer.Offset, receiveBuffer.Count);

            SocketAsyncEventArgs sender = new SocketAsyncEventArgs();
            sender.Completed += new EventHandler<SocketAsyncEventArgs>(SendCompleted);
            sender.SetBuffer(sendBuffer.Array, sendBuffer.Offset, sendBuffer.Count);

            m_receiver = receiver;
            m_receiveOffset = receiver.Offset;
            m_receiveMax = receiver.Count;

            m_sender = sender;
            m_sendOffset = sender.Offset;
            m_sendMax = sender.Count;
        }
开发者ID:abel,项目名称:sinan,代码行数:25,代码来源:SocketToken.cs

示例5: QualifierAnnotationAutowireCandidateResolver

	    /// <summary>
	    /// Create a new QualifierAnnotationAutowireCandidateResolver
	    /// for the given qualifier attribute types.
	    /// </summary>
	    /// <param name="qualifierTypes">the qualifier annotations to look for</param>
	    public QualifierAnnotationAutowireCandidateResolver(Collections.Generic.ISet<Type> qualifierTypes) {
            AssertUtils.ArgumentNotNull(qualifierTypes, "'qualifierTypes' must not be null");
            foreach(var type in qualifierTypes)
            {
                if (!_qualifierTypes.Contains(type))
                    _qualifierTypes.Add(type);
            }
	    }
开发者ID:fgq841103,项目名称:spring-net,代码行数:13,代码来源:QualifierAnnotationAutowireCandidateResolver.cs

示例6: Initialise

        public override void Initialise(Collections.INamedDataProvider initialisationData)
        {
            base.Initialise(initialisationData);

            initialisationData.TryCopyValue(this, TextureName, _texture);
            initialisationData.TryCopyValue(this, BrightnessName, _brightness);
            initialisationData.TryCopyValue(this, GammaCorrectName, _gammaCorrect);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:8,代码来源:Skybox.cs

示例7: Initialise

        public override void Initialise(Collections.INamedDataProvider initialisationData)
        {
            base.Initialise(initialisationData);

            initialisationData.TryCopyValue(this, SkyColourName, _skyColour);
            initialisationData.TryCopyValue(this, GroundColourName, _groundColour);
            initialisationData.TryCopyValue(this, UpName, _up);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:8,代码来源:AmbientLight.cs

示例8: Content_CheckedItemsChanged

 private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
   if (Content != null) {
     foreach (IFilter filter in e.Items) {
       filter.Active = checkedFilterView.Content.ItemChecked(filter);
     }
     UpdateFilterInfo();
   }
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:8,代码来源:FilterView.cs

示例9: Parser

    public Parser(Collections.IList<object> tokens)
    {
        this.tokens = tokens;
        this.index = 0;
        this.result = this.ParseStmt();

        if (this.index != this.tokens.Count)
            throw new System.Exception("expected EOF");
    }
开发者ID:santosh-mnrec,项目名称:Compiler,代码行数:9,代码来源:Parser.cs

示例10: Initialise

        public override void Initialise(Collections.INamedDataProvider initialisationData)
        {
            base.Initialise(initialisationData);

            initialisationData.TryCopyValue(this, ColourName, _colour);
            initialisationData.TryCopyValue(this, DirectionName, _direction);
            initialisationData.TryCopyValue(this, ShadowResolutionName, _shadowResolution);
            initialisationData.TryCopyValue(this, ActiveName, _active);
        }
开发者ID:ylyking,项目名称:Myre,代码行数:9,代码来源:SunLight.cs

示例11: Parser

    public Parser(Collections.IList<object> tokens)
    {
        this.tokens = tokens;
        this.indice = 0;
        this.resultado = this.ParseStmt();

        if (this.indice != this.tokens.Count)
            throw new System.Exception("se esperaba el final del archivo");
    }
开发者ID:FANMixco,项目名称:Simple_Compiler,代码行数:9,代码来源:Parser.cs

示例12: Initialise

        public override void Initialise(Collections.INamedDataProvider initialisationData)
        {
            base.Initialise(initialisationData);

            initialisationData.TryCopyValue(this, ColourName, _colour);
            initialisationData.TryCopyValue(this, PositionName, _position);
            initialisationData.TryCopyValue(this, RangeName, _range);
            initialisationData.TryCopyValue(this, ActiveName, _active);
        }
开发者ID:xoxota99,项目名称:Myre,代码行数:9,代码来源:PointLight.cs

示例13: MethodParamPair

     public MethodParamPair(
 MethodParamResult method,
 Interfaces.IEventInput input,
         Collections.ExitPathGroup _paths)
     {
         _result = MethodResult.None;
         _method = method;
         _params = input;
         _exitPaths = _paths;
     }
开发者ID:soljakwinever,项目名称:ElegyOfDisharmony,代码行数:10,代码来源:MethodParamPair.cs

示例14: OnItemsChanged

        protected override void OnItemsChanged(Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if (e.Action == Collections.Specialized.NotifyCollectionChangedAction.Remove)
            {
                // Don't select itself when its child items got removed. (Default action of base.OnItemsChanged)
                // The selection should be managed by designer surface.
                return;
            }

            base.OnItemsChanged(e);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:11,代码来源:DesignerTreeViewItem.cs

示例15: CreateNode

        internal static Node<TreeNode> CreateNode(this HierarchyNode<ContentItem> structure, IContentAdapterProvider adapters, Collections.ItemFilter filter)
        {
            var adapter = adapters.ResolveAdapter<NodeAdapter>(structure.Current);

            var children = structure.Children.Select(c => CreateNode(c, adapters, filter)).ToList();
            return new Node<TreeNode>
            {
                Current = adapter.GetTreeNode(structure.Current),
                HasChildren = adapter.HasChildren(structure.Current, filter),
                Expanded = children.Any(),
                Children = children
            };
        }
开发者ID:rickyinnz,项目名称:n2cms,代码行数:13,代码来源:ApiExtensions.cs


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