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

C# Collections类代码示例

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

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



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


示例16: CheckForEmtyRunnerInstances

        /// <summary>
        /// Checks for emty runner instances.
        /// </summary>
        /// <param name="runners">The runners.</param>
        /// <returns></returns>
        public static Collections.SelectionList CheckForEmtyRunnerInstances(Collections.SelectionList runners)
        {
            if (runners == null) return runners;

            int removeAt = -1;

            for (int x = 0; x < runners.Count; x++)
            {
                if (runners[x].selectionId <= 0) removeAt = x;
            }

            if (removeAt > -1) runners.RemoveAt(removeAt);

            return runners;
        }
开发者ID:qkostal,项目名称:program,代码行数:20,代码来源:Helper.cs


示例17: Main

        static void Main(string[] args)
        {
            IEnumerable<int> list = new List<int>() { 1, 2, 3, 5 };

            foreach (int number in list)
            {
                Console.WriteLine(number);
            }

            // ... e echivalent cu:
            using (var enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    int number = enumerator.Current;
                    Console.WriteLine(number);
                }
            }

            var collections = new Collections();
            foreach (var dwarf in collections.TheSevenDwarves())
            {
                Console.WriteLine("Here comes {0}", dwarf);
            }

            var fibonacci = collections.Fibonacci();
            var firstFibonacci = collections.FirstTwelve(fibonacci);
            foreach (var n in firstFibonacci)
            {
                Console.WriteLine(n);
            }

            Console.WriteLine("------------------------------------------");

            var newFibonacci = collections.Fibonacci();
            var evenFibonacci = collections.OnlyEven(newFibonacci);
            var firstEvenFibonacci = collections.FirstTwelve(evenFibonacci);
            foreach (var n in firstEvenFibonacci)
            {
                Console.WriteLine(n);
            }
        }
开发者ID:TeamnetGroup,项目名称:csharp1,代码行数:42,代码来源:Program.cs


示例18: _create

		protected override Resource _create( string name, ulong handle, string group, bool isManual, IManualResourceLoader loader, Collections.NameValuePairList createParams )
		{
			string paramSyntax = string.Empty;
			string paramType = string.Empty;

			if ( createParams == null || createParams.ContainsKey( "syntax" ) == false || createParams.ContainsKey( "type" ) == false )
			{
				throw new AxiomException( "You must supply 'syntax' and 'type' parameters" );
			}
			else
			{
				paramSyntax = createParams[ "syntax" ];
				paramType = createParams[ "type" ];
			}
			CreateGpuProgramDelegate iter = null;
			if ( this._programMap.ContainsKey( paramSyntax ) )
			{
				iter = this._programMap[ paramSyntax ];
			}
			else
			{
				// No factory, this is an unsupported syntax code, probably for another rendersystem
				// Create a basic one, it doesn't matter what it is since it won't be used
				return new GLES2GpuProgram( this, name, handle, group, isManual, loader );
			}
			GpuProgramType gpt;
			if ( paramType == "vertex_program" )
			{
				gpt = GpuProgramType.Vertex;
			}
			else
			{
				gpt = GpuProgramType.Fragment;
			}

			return iter( this, name, handle, group, isManual, loader, gpt, paramSyntax );
		}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:37,代码来源:GLES2GpuProgramManager.cs


示例19: ComboBox_Initialize

		public void ComboBox_Initialize(Collections.SelectableListNodeList items, Collections.SelectableListNode defaultItem)
		{
			_cbComboBox.ItemsSource = null;
			_cbComboBox.ItemsSource = items;
			_cbComboBox.SelectedItem = defaultItem;
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:6,代码来源:SpinAndComboBoxControl.xaml.cs


示例20: effectPool_EffectRemoved

 private void effectPool_EffectRemoved(object sender, Collections.ObservableCollectionEventArgs<Effect> e)
 {
     RemoveEffect(e.Item);
 }
开发者ID:SickheadGames,项目名称:SharpDX,代码行数:4,代码来源:EffectCompilerSystem.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CollegeERPDBEntities类代码示例发布时间:2022-05-24
下一篇:
C# CollectionView类代码示例发布时间: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