本文整理汇总了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;
}
示例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);
}
}
示例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();
}
示例4: Create
public static RequestHeaders Create(ILookup<string, string> headers)
{
return new RequestHeaders(headers
.Select(header => new KeyValuePair<string, IEnumerable<string>>(header.Key, header)));
}
示例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);
}
}
示例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));
}
示例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);
}
}
示例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());
}
示例9: GetHeaders
IEnumerable<KeyValuePair<string, IEnumerable<string>>> GetHeaders(ILookup<string, string> headers)
{
return headers.Select(h => new KeyValuePair<string, IEnumerable<string>>(h.Key, h));
}