CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets for: naveensrinivasan
C#
////////////////// First Option
    public IEnumerable<Tuple<T,Tuple<bool,string>>> GetFailedSystemRules<T>(T item, 
           IEnumerable<Func<T,Tuple<bool,string>>> funcs)
       {
           return funcs.Select(f => Tuple.Create(item,f(item))).Where(f => f.Item2.Item1 == false);
       }
        public IEnumerable<Tuple<T,Tuple<bool,string>>> GetPassedSystemRules<T>(T item, 
           IEnumerable<Func<T,Tuple<bool,string>>> funcs)
       {
           return funcs.Select(f => Tuple.Create(item,f(item))).Where(f => f.Item2.Item1 == true);
by naveensrinivasan   September 12, 2010 @ 8:25am
Tags:
120 Views
no comments
 
C#
namespace TestPerson
{
    public class Person
    {
        public string Name { get; set; }
        public int Age { get; set; }
        public char Sex { get; set; }
    }
}
by naveensrinivasan   April 29, 2010 @ 5:01pm
Tags:
182 Views
no comments
 
BeginHeader
   UnknownEvent/Classic,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                              EventGuid, Type, Level, Version, MofLength
   InvalidEvent/Classic,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                              EventGuid, Type, Level, Version, MofLength
   UnknownEvent/Crimson,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                             ProviderId,     Id,   Task, Opcode, Version, Channel, Level,            Keyword, UserDataLength
   InvalidEvent/Crimson,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                             ProviderId,     Id,   Task, Opcode, Version, Channel, Level,            Keyword, UserDataLength
Microsoft-Windows-DotNETRuntime/Exception /Start ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, ExceptionType, ExceptionMessage, ExceptionEIP, ExceptionHRESULT, ExceptionFlags, ClrInstanceID
Microsoft-Windows-DotNETRuntime/Runtime /Start ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, ClrInstanceID, Sku, BclMajorVersion, BclMinorVersion, BclBuildNumber, BclQfeNumber, VMMajorVersion, VMMinorVersion, VMBuildNumber, VMQfeNumber, StartupFlags, StartupMode, CommandLine, ComObjectGuid, RuntimeDllPath
FirstReliableEventTimeStamp, TimeStamp
EndHeader
OS Version: 6.1.7600, Trace Size: 128KB, Events Lost: 0, Buffers lost: 0, Trace Start: 129137010665867140, Trace Length: 24 sec, PointerSize: 8, Trace Name: clrevents.etl
by naveensrinivasan   March 21, 2010 @ 8:29pm
Tags: etw
714 Views
no comments
 
BeginHeader
   UnknownEvent/Classic,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                              EventGuid, Type, Level, Version, MofLength
   InvalidEvent/Classic,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                              EventGuid, Type, Level, Version, MofLength
   UnknownEvent/Crimson,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                             ProviderId,     Id,   Task, Opcode, Version, Channel, Level,            Keyword, UserDataLength
   InvalidEvent/Crimson,  TimeStamp,     Process Name ( PID),   ThreadID, CPU,                             ProviderId,     Id,   Task, Opcode, Version, Channel, Level,            Keyword, UserDataLength
Microsoft-Windows-DotNETRuntime/GC /Start ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, Count, Depth, Reason, Type, ClrInstanceID
Microsoft-Windows-DotNETRuntime/GC /Stop ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, Count, Depth, ClrInstanceID
Microsoft-Windows-DotNETRuntime/GC /RestartEEStop ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, ClrInstanceID
Microsoft-Windows-DotNETRuntime/GC /HeapStats ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, GenerationSize0, TotalPromotedSize0, GenerationSize1, TotalPromotedSize1, GenerationSize2, TotalPromotedSize2, GenerationSize3, TotalPromotedSize3, FinalizationPromotedSize, FinalizationPromotedCount, PinnedObjectCount, SinkBlockCount, GCHandleCount, ClrInstanceID
Microsoft-Windows-DotNETRuntime/GC /CreateSegment ,  TimeStamp,     Process Name ( PID),   ThreadID, CPU, etw:ActivityId, etw:Related ActivityId, etw:UserSid, etw:SessionId, Address, Size, Type, ClrInstanceID
by naveensrinivasan   March 21, 2010 @ 3:16pm
Tags:
657 Views
no comments
 
C#
//---------------------------------------------------------------------
// <autogenerated>
//
//     Generated by Message Compiler (mc.exe)
//
//     Copyright (c) Microsoft Corporation. All Rights Reserved.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </autogenerated>
by naveensrinivasan   March 16, 2010 @ 9:45pm
Tags: etw
803 Views
no comments
 
XML
<?xml version="1.0" encoding="UTF-16"?>
<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:trace="http://schemas.microsoft.com/win/2004/08/events/trace">
    <instrumentation>
        <events>
            <provider name="SampleProvider" message="$(string.ProviderMessage)" guid="{D9B453B9-6230-486C-8DEC-C7C5A2230D04}" symbol="SampleProvider" resourceFileName="f:\downloads\EtwProvider.exe" messageFileName="f:\downloads\EtwProvider.exe">
                <events>
                    <event symbol="SampleEvent" value="1001" version="1" channel="SampleOperationalChannel" level="win:Informational" template="SimpleTemplate" task="SampleTask" opcode="SampleOpCode" keywords="SampleKeyword" message="$(string.SampleProvider.SampleEvent.message)">
                    </event>
                </events>
                <levels>
by naveensrinivasan   March 16, 2010 @ 9:30pm
Tags: etw
257 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate