Ejemplo n.º 1
0
 /// <summary>
 /// Set the properties from both overloaded constructors.
 /// </summary>
 /// <param name="containerInfo">
 /// The container Info if applicable.
 /// </param>
 /// <param name="container">
 /// The container if applicable.
 /// </param>
 /// <param name="propertyInfo">
 /// The property info.
 /// </param>
 /// <param name="resolveStatus">
 /// The resolve Status.
 /// </param>
 private void SetProperties(Tuple <string, Guid> containerInfo, Thing container, PropertyMetaInfo propertyInfo, ResolveStatus resolveStatus)
 {
     this.ContainerPlaceHolder = containerInfo;
     this.Container            = container;
     this.PropertyInfo         = propertyInfo;
     this.ResolveStatus        = resolveStatus;
 }
Ejemplo n.º 2
0
        internal static string ToSerializedValue(this ResolveStatus value)
        {
            switch (value)
            {
            case ResolveStatus.Initialized:
                return("Initialized");

            case ResolveStatus.Resolved:
                return("Resolved");

            case ResolveStatus.InvalidSyntax:
                return("InvalidSyntax");

            case ResolveStatus.MSINotEnabled:
                return("MSINotEnabled");

            case ResolveStatus.VaultNotFound:
                return("VaultNotFound");

            case ResolveStatus.SecretNotFound:
                return("SecretNotFound");

            case ResolveStatus.SecretVersionNotFound:
                return("SecretVersionNotFound");

            case ResolveStatus.AccessToKeyVaultDenied:
                return("AccessToKeyVaultDenied");

            case ResolveStatus.OtherReasons:
                return("OtherReasons");
            }
            return(null);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="ResolveStatus" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResolveStatus.CreateFrom(sourceValue);
 public static string ToSerialString(this ResolveStatus value) => value switch
 {