/// <summary>Clone constructor. Generates a new <see cref="TypedElementSettings"/> instance initialized from the state of the specified instance.</summary> /// <exception cref="ArgumentNullException">The specified argument is <c>null</c>.</exception> public TypedElementSettings(TypedElementSettings other) { if (other == null) { throw Error.ArgumentNull(nameof(other)); } other.CopyTo(this); }
/// <summary>Copy all configuration settings to another instance.</summary> /// <param name="other">Another <see cref="TypedElementSettings"/> instance.</param> /// <exception cref="ArgumentNullException">The specified argument is <c>null</c>.</exception> public void CopyTo(TypedElementSettings other) { if (other == null) { throw Error.ArgumentNull(nameof(other)); } other.ErrorMode = ErrorMode; }
/// <summary>Copy all configuration settings to another instance.</summary> /// <param name="other">Another <see cref="TypedElementSettings"/> instance.</param> /// <exception cref="ArgumentNullException">The specified argument is <c>null</c>.</exception> public void CopyTo(TypedElementSettings other) { if (other == null) { throw Error.ArgumentNull(nameof(other)); } other.ErrorMode = ErrorMode; #pragma warning disable CS0618 // Type or member is obsolete other.TruncateDateTimeToDate = TruncateDateTimeToDate; #pragma warning restore CS0618 // Type or member is obsolete }
public TypedElementNode(ISourceNode element, string type, IStructureDefinitionSummaryProvider provider, TypedElementSettings settings = null) { if (element == null) { throw Error.ArgumentNull(nameof(element)); } Provider = provider ?? throw Error.ArgumentNull(nameof(provider)); _settings = settings ?? new TypedElementSettings(); if (element is IExceptionSource ies && ies.ExceptionHandler == null) { ies.ExceptionHandler = (o, a) => ExceptionHandler.NotifyOrThrow(o, a); } ShortPath = element.Name; Current = buildRootPosition(element, type, provider); }
public TypedElementOnSourceNode(ISourceNode source, string type, IStructureDefinitionSummaryProvider provider, TypedElementSettings settings = null) { if (source == null) { throw Error.ArgumentNull(nameof(source)); } Provider = provider ?? throw Error.ArgumentNull(nameof(provider)); _settings = settings ?? new TypedElementSettings(); if (source is IExceptionSource ies && ies.ExceptionHandler == null) { ies.ExceptionHandler = (o, a) => ExceptionHandler.NotifyOrThrow(o, a); } ShortPath = source.Name; _source = source; (InstanceType, Definition) = buildRootPosition(type); }