Show / Hide Table of Contents

Class ExternalParameterAttribute

Decorates properties that may be used as bindable external parameters. Provides methods for extraction of parameter names, values and binding of external object values into public read/write properties decorated by this attribute

Inheritance
System.Object
System.Attribute
ExternalParameterAttribute
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX
Assembly: NFX.dll
Syntax
[AttributeUsage(AttributeTargets.Property, Inherited = true, AllowMultiple = false)]
public sealed class ExternalParameterAttribute : Attribute

Constructors

ExternalParameterAttribute()

Declaration
public ExternalParameterAttribute()

ExternalParameterAttribute(String, ExternalParameterSecurityCheck, String[])

Provides a name override with list of groups names where this parameter applies

Declaration
public ExternalParameterAttribute(string name, ExternalParameterSecurityCheck security, params string[] groups)
Parameters
Type Name Description
System.String name
ExternalParameterSecurityCheck security
System.String[] groups

ExternalParameterAttribute(String[])

Provides a list of group names where this parameter applies

Declaration
public ExternalParameterAttribute(params string[] groups)
Parameters
Type Name Description
System.String[] groups

Fields

Groups

Returns null or a set of group names where parameter is applicable. This is needed to disregard parameters that do not belong to things being managed, for example, some parameters may be only set for isntrumentation, not for glue etc.

Declaration
public readonly IEnumerable<string> Groups
Field Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

Name

Provides name override for external parameter. When this value is not set the name is taken from the decorated member name

Declaration
public readonly string Name
Field Value
Type Description
System.String

SecurityCheck

Specifies what security check must be done on get/set

Declaration
public readonly ExternalParameterSecurityCheck SecurityCheck
Field Value
Type Description
ExternalParameterSecurityCheck

Methods

GetParameter(Object, String, out Object, String[])

Gets instrumentation parameter value returning true if parameter was found. Parameter names are case-insensitive. If groups is null then all parameters are searched, else parameters must intersect in their group sets with the supplied value

Declaration
public static bool GetParameter(object target, string name, out object value, params string[] groups)
Parameters
Type Name Description
System.Object target
System.String name
System.Object value
System.String[] groups
Returns
Type Description
System.Boolean

GetParameters(Object, String[])

Returns external parameter names and type - names for read/write public properties decorated with this attribute. If groups is null then all parameters returned, else parameters must intersect in their group sets with the supplied value

Declaration
public static IEnumerable<KeyValuePair<string, Type>> GetParameters(object target, params string[] groups)
Parameters
Type Name Description
System.Object target
System.String[] groups
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>>

GetParameters(Type, String[])

Returns external parameter names and type - names for read/write public properties decorated with this attribute. If groups is null then all parameters returned, else parameters must intersect in their group sets with the supplied value

Declaration
public static IEnumerable<KeyValuePair<string, Type>> GetParameters(Type target, params string[] groups)
Parameters
Type Name Description
System.Type target
System.String[] groups
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>>

GetParametersWithAttrs(Type, String[])

Returns external parameter names, type and attributes - names for read/write public properties decorated with this attribute. If groups is null then all parameters returned, else parameters must intersect in their group sets with the supplied value

Declaration
public static IEnumerable<Tuple<string, Type, ExternalParameterAttribute>> GetParametersWithAttrs(Type target, params string[] groups)
Parameters
Type Name Description
System.Type target
System.String[] groups
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Tuple<System.String, System.Type, ExternalParameterAttribute>>

SetParameter(Object, String, Object, String[])

Sets instrumentation parameter value, true if parameter name was found and set succeeded. The property is tried to be set directly to the supplied value first, then, in case of assignment error, the value is converted into string then tried to be re-converted to target type. Returns true for successful set. Parameter names are case-insensitive. If groups is null then all parameters are searched, else parameters must intersect in their group sets with the supplied value

Declaration
public static bool SetParameter(object target, string name, object value, params string[] groups)
Parameters
Type Name Description
System.Object target
System.String name
System.Object value
System.String[] groups
Returns
Type Description
System.Boolean

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX