diff --git a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilder.cs b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilder.cs index e348c0a77c..ca05de44a4 100644 --- a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilder.cs +++ b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilder.cs @@ -1,5 +1,4 @@ -using System; -using Windows.Foundation.Diagnostics; +using Windows.Foundation.Diagnostics; namespace ReactNative.Tracing { diff --git a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.generated.cs b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.generated.cs index 64275698f1..a3b8eef0ac 100644 --- a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.generated.cs +++ b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.generated.cs @@ -7,347 +7,367 @@ namespace ReactNative.Tracing { public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Boolean value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddBoolean(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Boolean[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Boolean[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddBooleanArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Double value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddDouble(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Double[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Double[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddDoubleArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Guid value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddGuid(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Guid[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Guid[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddGuidArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int16 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt16(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int16[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int16[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt16Array(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int32 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt32(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int32[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int32[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt32Array(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int64 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt64(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int64[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Int64[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddInt64Array(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Single value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddSingle(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Single[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Single[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddSingleArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, String value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddString(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, String[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, String[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddStringArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, TimeSpan value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddTimeSpan(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, TimeSpan[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, TimeSpan[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddTimeSpanArray(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt16 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt16(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt16[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt16[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt16Array(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt32 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt32(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt32[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt32[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt32Array(name, value); - } + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt64 value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt64(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt64[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, UInt64[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.AddUInt64Array(name, value); - } + } - return builder; + return builder; + } + + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Byte value) + { + if (builder != null) + { + builder.Fields.AddUInt8(name, value); + } + + return builder; + } + + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Byte[] value) + { + if (builder != null) + { + builder.Fields.AddUInt8Array(name, value); + } + + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Char value) { - if (builder != null) - { - builder.Fields.AddChar16(name, value); - } + if (builder != null) + { + builder.Fields.AddChar16(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Char[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Char[] value) { - if (builder != null) - { - builder.Fields.AddChar16Array(name, value); - } + if (builder != null) + { + builder.Fields.AddChar16Array(name, value); + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, DateTimeOffset value) { - if (builder != null) - { - builder.Fields.AddDateTime(name, value); - } + if (builder != null) + { + builder.Fields.AddDateTime(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, DateTimeOffset[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, DateTimeOffset[] value) { - if (builder != null) - { - builder.Fields.AddDateTimeArray(name, value); - } + if (builder != null) + { + builder.Fields.AddDateTimeArray(name, value); + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Rect value) { - if (builder != null) - { - builder.Fields.AddRect(name, value); - } + if (builder != null) + { + builder.Fields.AddRect(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Rect[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Rect[] value) { - if (builder != null) - { - builder.Fields.AddRectArray(name, value); - } + if (builder != null) + { + builder.Fields.AddRectArray(name, value); + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Point value) { - if (builder != null) - { - builder.Fields.AddPoint(name, value); - } + if (builder != null) + { + builder.Fields.AddPoint(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Point[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Point[] value) { - if (builder != null) - { - builder.Fields.AddPointArray(name, value); - } + if (builder != null) + { + builder.Fields.AddPointArray(name, value); + } - return builder; + return builder; } public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Size value) { - if (builder != null) - { - builder.Fields.AddSize(name, value); - } + if (builder != null) + { + builder.Fields.AddSize(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Size[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, Size[] value) { - if (builder != null) - { - builder.Fields.AddSizeArray(name, value); - } + if (builder != null) + { + builder.Fields.AddSizeArray(name, value); + } - return builder; + return builder; } - public static IDisposable Start(this LoggingActivityBuilder builder) - { - return builder?.Create(); - } + public static IDisposable Start(this LoggingActivityBuilder builder) + { + return builder?.Create(); + } } } diff --git a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.tt b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.tt index de44567412..51bcd5d72c 100644 --- a/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.tt +++ b/ReactWindows/ReactNative/Tracing/LoggingActivityBuilderExtensions.tt @@ -23,15 +23,16 @@ var types = new[] var mappings = new Dictionary { - { typeof(char), "Char16" }, - { typeof(DateTimeOffset), "DateTime" }, + { typeof(byte), "UInt8" }, + { typeof(char), "Char16" }, + { typeof(DateTimeOffset), "DateTime" }, }; var others = new[] { - "Rect", - "Point", - "Size", + "Rect", + "Point", + "Size", }; #> @@ -48,22 +49,22 @@ foreach (var type in types) #> public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=type.Name#> value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.Add<#=type.Name#>(name, value); } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=type.Name#>[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=type.Name#>[] value) { - if (builder != null) - { + if (builder != null) + { builder.Fields.Add<#=type.Name#>Array(name, value); - } + } - return builder; + return builder; } <# @@ -75,22 +76,22 @@ foreach (var mapping in mappings) #> public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=mapping.Key.Name#> value) { - if (builder != null) - { - builder.Fields.Add<#=mapping.Value#>(name, value); - } + if (builder != null) + { + builder.Fields.Add<#=mapping.Value#>(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=mapping.Key.Name#>[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=mapping.Key.Name#>[] value) { - if (builder != null) - { - builder.Fields.Add<#=mapping.Value#>Array(name, value); - } + if (builder != null) + { + builder.Fields.Add<#=mapping.Value#>Array(name, value); + } - return builder; + return builder; } <# @@ -102,30 +103,30 @@ foreach (var other in others) #> public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=other#> value) { - if (builder != null) - { - builder.Fields.Add<#=other#>(name, value); - } + if (builder != null) + { + builder.Fields.Add<#=other#>(name, value); + } - return builder; + return builder; } - public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=other#>[] value) + public static LoggingActivityBuilder With(this LoggingActivityBuilder builder, string name, <#=other#>[] value) { - if (builder != null) - { - builder.Fields.Add<#=other#>Array(name, value); - } + if (builder != null) + { + builder.Fields.Add<#=other#>Array(name, value); + } - return builder; + return builder; } <# } #> - public static IDisposable Start(this LoggingActivityBuilder builder) - { - return builder?.Create(); - } + public static IDisposable Start(this LoggingActivityBuilder builder) + { + return builder?.Create(); + } } } diff --git a/ReactWindows/ReactNative/Tracing/Tracer.cs b/ReactWindows/ReactNative/Tracing/Tracer.cs index df5359718a..a4d9200c26 100644 --- a/ReactWindows/ReactNative/Tracing/Tracer.cs +++ b/ReactWindows/ReactNative/Tracing/Tracer.cs @@ -8,7 +8,7 @@ namespace ReactNative.Tracing /// static class Tracer { - /// + /// /// Trace ID for bridge events. /// public const int TRACE_TAG_REACT_BRIDGE = 0;