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


C# ILookup.Select方法代码示例

本文整理汇总了C#中ILookup.Select方法的典型用法代码示例。如果您正苦于以下问题:C# ILookup.Select方法的具体用法?C# ILookup.Select怎么用?C# ILookup.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILookup的用法示例。


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

示例1: GetConstructorArguments

        public IEnumerable<MemberNameAndValue> GetConstructorArguments(ILookup<string, ParameterInfo> arguments)
        {
            var constructorArguments = GetAllStoredMembers().Where(member => arguments.Select(a => a.Key.ToPascalCase()).Contains(member.Name)).ToList();
            foreach (var constructorArgument in constructorArguments)
            {
                _members.Remove(constructorArgument.Name);
            }

            return constructorArguments;
        }
开发者ID:fffej,项目名称:BobTheBuilder,代码行数:10,代码来源:InMemoryArgumentStore.cs

示例2: lineLocating

        public lineLocating()
        {
            #region //这里用的是通用方法
            ExcuteSqlScript es = new ExcuteSqlScript();
            //es.insertSqltableIntoMapinfo(tableName);
            es.createLocatingTable(tableName);
            #endregion

            eventsLookup = dc.EventLocating.ToLookup(e => e.events);

            eventsKey = eventsLookup.Select(e => e.Key);

            foreach (var p in eventsKey)
            {
                foreach (var q in eventsLookup[p])
                {
                   // Console.WriteLine(".....{0}...{1}....{2}", q.events, 3 * Math.Pow(10, -8), q.SP_GEOMETRY.STArea());

                    //这里剔除天线高度为0的小区,避免定位干扰?
                    if (q.SP_GEOMETRY.STArea() >3 * Math.Pow(10, -8))
                    {
                        //Console.WriteLine("面接多少.....{0}....", q.SP_GEOMETRY.STArea());
                        mrPointsgeom = mrPointsgeom.STUnion(q.SP_GEOMETRY);
                        events = q.events;
                    }
                }

                redindex++;
                if (redindex > 255) redindex = 0;
                pencolor = redindex * 65535 + greenindex * 256 + blueindex;
                pen = "Pen (1, 2," + pencolor.ToString() + ")";

                mrPointsgeom = mrPointsgeom.STConvexHull().STCentroid().STPointN(1);

                if (!mrPointsgeom.STIsValid()) continue;

                tsgeog = SqlGeography.STGeomFromWKB(mrPointsgeom.STAsBinary(), 4326);

                if (tsgeog.IsNull) continue;

                tsgeog = SqlGeography.Point((double)tsgeog.Lat, (double)tsgeog.Long, 4326);
                tsgeog = tsgeog.STBuffer(1);

                mrLinesgeom = SqlGeometry.STGeomFromWKB(tsgeog.STAsBinary(), 4326);

                Console.WriteLine(mrLinesgeom.STArea());
                insertLocating2Sql(events, pen, mrLinesgeom);
            }
        }
开发者ID:rupeshkumar399,项目名称:seemapcell,代码行数:49,代码来源:lineLocating.cs

示例3: FuncWithLookup

        public void FuncWithLookup()
        {
            _myLookup = _bigList.ToLookup(p => p.PayId, p => p);

            var payids = _myLookup.Select(g => g.Key);

               var myStuff = from payid in payids
                select new
                {
                    PayId = payid,
                    coverages = string.Join(",", _myLookup[payid].Select(x => x.CategoryCode)),
                    total = _myLookup[payid].Select(x => x.PaymentAmount).Sum()
                };

            var myList = myStuff.ToList();
        }
开发者ID:hypertheory-training,项目名称:PerformanceUtilities,代码行数:16,代码来源:LinqLookups.cs

示例4: Create

 public static RequestHeaders Create(ILookup<string, string> headers)
 {
     return new RequestHeaders(headers
         .Select(header => new KeyValuePair<string, IEnumerable<string>>(header.Key, header)));
 }
开发者ID:farukc,项目名称:Dash,代码行数:5,代码来源:RequestHeaders.cs

示例5: SetACL

 public void SetACL(string path, ILookup<string, string> acl)
 {
     var aclPath = GetAclPath(path);
     if (acl != null)
     {
         var rootElement = new XElement("Policies", acl.Select(p => new XElement(PolicyElementName,
             new XAttribute(GroupUserNameAttributeName, p.Key),
             p.Select(r => new XElement(RoleElementName, r)))));
         var xml = new XDocument(rootElement);
         xml.Save(aclPath);
     }
     else
     {
         File.Delete(aclPath);
     }
 }
开发者ID:duracellko,项目名称:RSTransfer,代码行数:16,代码来源:LocalReportsStore.cs

示例6: VerifyAbsolutePaths

 void VerifyAbsolutePaths(ILookup<string, string> paths, string message)
 {
     var invalid = paths.Select(_ => _).SelectMany(_ => _)
         .Where(_ => new OpenFileSystem.IO.Path(_).IsRooted == false)
         .JoinString(", ");
     if (invalid.Length > 0)
         throw new InvalidOperationException(string.Format("The following paths in  {0} are not rooted: {1}", message, invalid));
 }
开发者ID:modulexcite,项目名称:openwrap,代码行数:8,代码来源:MSBuildInstructionEmitter.cs

示例7: SetACL

        public void SetACL(string path, ILookup<string, string> acl)
        {
            var fullPath = NormalizePath(path);
            var client = this.CreateWebClient();

            if (acl != null)
            {
                var policies = acl.Select(g => new Policy
                    {
                        GroupUserName = g.Key,
                        Roles = g.Select(r => new Role() { Name = r }).ToArray()
                    }).ToArray();
                client.SetPolicies(fullPath, policies);
            }
            else
            {
                client.InheritParentSecurity(fullPath);
            }
        }
开发者ID:duracellko,项目名称:RSTransfer,代码行数:19,代码来源:ReportsStore.cs

示例8: InMemoryReferenceSet

 ///<summary>Creates an InMemoryReferenceSet that contains a set of items.</summary>
 public InMemoryReferenceSet(IEnumerable<ReferenceItem> items)
 {
     lookup = items.ToLookup(i => i.Label);
     Labels = new ReadOnlyCollection<string>(lookup.Select(g => g.Key).ToList());
 }
开发者ID:Amichai,项目名称:Prax,代码行数:6,代码来源:InMemoryReferenceSet.cs

示例9: GetHeaders

 IEnumerable<KeyValuePair<string, IEnumerable<string>>> GetHeaders(ILookup<string, string> headers)
 {
     return headers.Select(h => new KeyValuePair<string, IEnumerable<string>>(h.Key, h));
 }
开发者ID:henricj,项目名称:phonesm,代码行数:4,代码来源:HttpConnectionWebReader.cs


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