Imported Upstream version 4.4.2.4

Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-07-21 09:40:10 +00:00
parent 589d484eee
commit 0b4a830db1
343 changed files with 9849 additions and 688 deletions

View File

@@ -0,0 +1,49 @@
//
// EventDataAttribute.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
public class EventDataAttribute : Attribute
{
[MonoTODO]
public string Name
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
}
}

View File

@@ -0,0 +1,62 @@
//
// EventFieldAttribute.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
[AttributeUsage(AttributeTargets.Property)]
public class EventFieldAttribute : Attribute
{
[MonoTODO]
public EventFieldFormat Format
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
[MonoTODO]
public EventFieldTags Tags
{
get
{
throw new NotImplementedException ();
}
set
{
throw new NotImplementedException ();
}
}
}
}

View File

@@ -0,0 +1,43 @@
//
// EventFieldFormat.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
public enum EventFieldFormat
{
Boolean = 3,
Default = 0,
Hexadecimal = 4,
HResult = 15,
Json = 12,
String = 2,
Xml = 11
}
}

View File

@@ -0,0 +1,38 @@
//
// EventFieldTags.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
[Flags]
public enum EventFieldTags
{
None = 0
}
}

View File

@@ -0,0 +1,37 @@
//
// EventIgnoreAttribute.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
[AttributeUsage(AttributeTargets.Property)]
public class EventIgnoreAttribute : Attribute
{
}
}

View File

@@ -0,0 +1,71 @@
//
// EventListener.cs
//
// Authors:
// Frederik Carlier <frederik.carlier@quamotion.mobi>
//
// Copyright (C) 2015 Quamotion (http://quamotion.mobi)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections.Generic;
namespace System.Diagnostics.Tracing
{
public abstract class EventListener : IDisposable
{
protected EventListener ()
{
}
public static int EventSourceIndex(EventSource eventSource)
{
return 0;
}
public void EnableEvents (EventSource eventSource, EventLevel level)
{
}
public void EnableEvents (EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword)
{
}
public void EnableEvents (EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword, IDictionary<string, string> arguments)
{
}
public void DisableEvents (EventSource eventSource)
{
}
protected internal virtual void OnEventSourceCreated (EventSource eventSource)
{
}
protected internal abstract void OnEventWritten (EventWrittenEventArgs eventData);
public virtual void Dispose()
{
}
}
}

View File

@@ -0,0 +1,42 @@
//
// EventManifestOptions.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
[Flags]
public enum EventManifestOptions
{
AllCultures = 2,
AllowEventSourceOverride = 8,
None = 0,
OnlyIfNeededForRegistration = 4,
Strict = 1
}
}

View File

@@ -3,8 +3,10 @@
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
// Frederik Carlier <frederik.carlier@quamotion.mobi>
//
// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
// Copyrithg (C) 2015 Quamotion (http://quamotion.mobi)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -31,6 +33,12 @@ namespace System.Diagnostics.Tracing
{
public class EventSource : IDisposable
{
protected internal struct EventData
{
public IntPtr DataPointer { get; set; }
public int Size { get; set; }
}
protected EventSource ()
{
this.Name = this.GetType().Name;
@@ -150,50 +158,62 @@ namespace System.Diagnostics.Tracing
protected void WriteEvent (int eventId)
{
WriteEvent (eventId, new object[] { } );
}
protected void WriteEvent (int eventId, byte[] arg1)
{
WriteEvent (eventId, new object[] { arg1 } );
}
protected void WriteEvent (int eventId, int arg1)
{
WriteEvent (eventId, new object[] { arg1 } );
}
protected void WriteEvent (int eventId, string arg1)
{
WriteEvent (eventId, new object[] { arg1 } );
}
protected void WriteEvent (int eventId, int arg1, int arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, int arg1, int arg2, int arg3)
{
WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
}
protected void WriteEvent (int eventId, int arg1, string arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, long arg1)
{
WriteEvent (eventId, new object[] { arg1 } );
}
protected void WriteEvent (int eventId, long arg1, byte[] arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, long arg1, long arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, long arg1, long arg2, long arg3)
{
WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
}
protected void WriteEvent (int eventId, long arg1, string arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, params object[] args)
@@ -202,22 +222,27 @@ namespace System.Diagnostics.Tracing
protected void WriteEvent (int eventId, string arg1, int arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, string arg1, int arg2, int arg3)
{
WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
}
protected void WriteEvent (int eventId, string arg1, long arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, string arg1, string arg2)
{
WriteEvent (eventId, new object[] { arg1, arg2 } );
}
protected void WriteEvent (int eventId, string arg1, string arg2, string arg3)
{
WriteEvent (eventId, new object[] { arg1, arg2, arg3 } );
}
}
}

View File

@@ -0,0 +1,50 @@
//
// EventSourceException.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace System.Diagnostics.Tracing
{
public class EventSourceException : Exception
{
[MonoTODO]
public EventSourceException ()
{
}
[MonoTODO]
public EventSourceException (string message)
{
}
[MonoTODO]
public EventSourceException (string message, Exception innerException)
{
}
}
}

View File

@@ -0,0 +1,124 @@
//
// EventWrittenEventArgs.cs
//
// Authors:
// Frederik Carlier <frederik.carlier@quamotion.mobi>
//
// Copyright (C) 2015 Quamotion (http://quamotion.mobi)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace System.Diagnostics.Tracing
{
public class EventWrittenEventArgs : EventArgs
{
internal EventWrittenEventArgs (EventSource eventSource)
{
this.EventSource = eventSource;
}
public Guid ActivityId
{
get { return EventSource.CurrentThreadActivityId; }
}
public EventChannel Channel
{
get { return EventChannel.None; }
}
public int EventId
{
get;
internal set;
}
public string EventName
{
get;
internal set;
}
public EventSource EventSource
{
get;
private set;
}
public EventKeywords Keywords
{
get { return EventKeywords.None; }
}
public EventLevel Level
{
get { return EventLevel.LogAlways; }
}
public string Message
{
get;
internal set;
}
public EventOpcode Opcode
{
get { return EventOpcode.Info; }
}
public ReadOnlyCollection<object> Payload
{
get;
internal set;
}
public ReadOnlyCollection<string> PayloadNames
{
get;
internal set;
}
public Guid RelatedActivityId
{
get;
internal set;
}
public EventTags Tags
{
get { return EventTags.None; }
}
public EventTask Task
{
get { return EventTask.None; }
}
public byte Version
{
get { return 0; }
}
}
}