Somebody Out there Please could you please re-write below function to
make a little bit more sense:
private static List<FileInfo> GetMessagesByRole(ExtendedPrincipal
identity, string messagePath)
{
List<FileInfo> list = new List<FileInfo>();
if (_tourMessages == null)
{
LoadTourMessages(messagePath);
}
using (IEnumerator<string> enumerator = (from role in
identity.GetRoles() select role.Replace(" ",
string.Empty)).GetEnumerator())
{
var predicate = null;
string formmatedRole;
while (enumerator.MoveNext())
{
formmatedRole = enumerator.Current;
if (predicate == null)
{
predicate = <>h__TransparentIdentifier1b =>
formmatedRole.Equals(<>h__TransparentIdentifier1b.name,
StringComparison.InvariantCultureIgnoreCase);
}
list.AddRange(from <>h__TransparentIdentifier1b in
(from message in _tourMessages
let start = (message.Name.IndexOf("_") ==
-1) ? ((IEnumerable<<>f__AnonymousType8<<>f__AnonymousType7<FileInfo,
int>, string>>) 0) :
((IEnumerable<<>f__AnonymousType8<<>f__AnonymousType7<FileInfo, int>,
string>>) (message.Name.IndexOf("_") + 1))
select new { <>h__TransparentIdentifier1a =
<>h__TransparentIdentifier1a, name = message.Name.Substring(start,
message.Name.LastIndexOf(message.Extension) -
start) }).Where(predicate) select
<>h__TransparentIdentifier1b.<>h__TransparentIdentifier1a.message);
}
}
return list;
}
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net