/// <summary> /// Gets the value of a custom data-type based on a command value /// </summary> /// <param name="type">Custom data-type</param> /// <param name="name">Property name</param> /// <param name="value">Command value of the property</param> /// <returns>Value of custom data-type based on a command value</returns> private object?GetCustomDataTypeValue(Type type, string name, string value) { object?Result = null; if (this.CustomDataTypeHandlers.ContainsKey(type)) { CustomDataTypeHandler oHandler = this.CustomDataTypeHandlers[type]; Result = oHandler.Getter(name, value); } return(Result); }
/// <summary> /// Gets an indication whether a command value is valid for a custom data-ytpe or not /// </summary> /// <param name="type">Custom data-type</param> /// <param name="name">Property name</param> /// <param name="value">Command value</param> /// <param name="required">Indicator whether that value has to be required or not</param> /// <returns><c>true</c> if custom data-ytpe is valid, otherwise <c>false</c></returns> private bool IsValidCustomDataTypeValue(Type type, string name, string value, bool required) { bool Result = false; if (this.CustomDataTypeHandlers.ContainsKey(type)) { CustomDataTypeHandler oHandlerSet = this.CustomDataTypeHandlers[type]; Result = oHandlerSet.Validator(name, value, required); } return(Result); }