Serilog.Tests.LoggerConfigurationTests.ProjectedDestructuringPolicy.TryDestructure C# (CSharp) Метод

TryDestructure() публичный Метод

public TryDestructure ( object value, ILogEventPropertyValueFactory propertyValueFactory, LogEventPropertyValue &result ) : bool
value object
propertyValueFactory ILogEventPropertyValueFactory
result Serilog.Events.LogEventPropertyValue
Результат bool
            public bool TryDestructure(object value, ILogEventPropertyValueFactory propertyValueFactory, out LogEventPropertyValue result)
            {
                if (value == null) throw new ArgumentNullException(nameof(value));

                if (!_canApply(value.GetType()))
                {
                    result = null;
                    return false;
                }

                var projected = _projection(value);
                result = propertyValueFactory.CreatePropertyValue(projected, true);
                return true;
            }
LoggerConfigurationTests.ProjectedDestructuringPolicy