src/Uno.Diagnostics.Eventing.Providers/ManifestProvider.Builder.cs
/// <summary>
/// Gets a list of providers available for the current process
/// </summary>
Gets a list of providers available for the current process
Gets a list of providers available for the current process
public static ManifestProvider[] GetProviders()
		{
			lock (_gate)
			{
				if (_providers == null)
				{
					var q = from assembly in GetAllAssembies()
							from type in GetTypes(assembly)
							where type.Name == "TraceProvider"
							let actualType = FindActualType(type)
							where actualType != null
							let idField = actualType.GetField("Id")
							where idField != null
							let eventFields = from field in actualType.GetFields()
											  where field.FieldType == typeof(int)
											  select new ManifestEvent
											  {
												  EventName = field.Name,
												  EventId = (int)field.GetValue(null)
											  }
							select new ManifestProvider
							{
								ProviderId = idField.GetValue(null)?.ToString(),
								ProviderName = actualType.DeclaringType.Name,
								Events = eventFields.ToArray()
							};
					_providers = q.ToArray();
					DebugHelper.WriteLine("Available providers: " + _providers.Select(p => "*Uno-" + p.ProviderName).JoinBy(","));
				}
				return _providers;
			}
		}
public static ManifestProvider [ ] GetProviders ( ) { lock ( _gate ) { if ( _providers == null ) { var q = from assembly in GetAllAssembies ( ) from type in GetTypes ( assembly ) where type . Name == " " let actualType = FindActualType ( type ) where actualType != null let idField = actualType . GetField ( " " ) where idField != null let eventFields = from field in actualType . GetFields ( ) where field . FieldType == typeof ( int ) select new ManifestEvent { EventName = field . Name , EventId = ( int ) field . GetValue ( null ) } select new ManifestProvider { ProviderId = idField . GetValue ( null ) ? . ToString ( ) , ProviderName = actualType . DeclaringType . Name , Events = eventFields . ToArray ( ) } ; _providers = q . ToArray ( ) ; DebugHelper . WriteLine ( " " + _providers . Select ( p => " " + p . ProviderName ) . JoinBy ( " " ) ) ; } return _providers ; } }
Gets a list of providers available for the current process
Gets a list of providers available for the current process
// Display the providers that can be used when capturing with PerfView