// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using System.Text; namespace SharpDX.Direct2D1 { /// /// Metadata description for property binding. /// [AttributeUsage(AttributeTargets.Property, Inherited = true)] public class PropertyBindingAttribute : Attribute { private readonly PropertyType bindingType; private readonly int order; private readonly string min; private readonly string max; private readonly string defaultValue; /// /// Initializes a new instance of attribute. /// /// Order of the property /// Minimum value of this property /// Maximum value of this property /// Default value of this property public PropertyBindingAttribute(int order, string min, string max, string defaultValue) : this(PropertyType.Unknown, order, min, max, defaultValue) { } /// /// Initializes a new instance of attribute. /// /// Type of binding /// Order of the property /// Minimum value of this property /// Maximum value of this property /// Default value of this property public PropertyBindingAttribute(PropertyType bindingType, int order, string min, string max, string defaultValue) { this.bindingType = bindingType; this.order = order; this.min = min; this.max = max; this.defaultValue = defaultValue; } /// /// Gets binding type. /// public PropertyType BindingType { get { return bindingType; } } /// /// Gets the order of this property. /// public int Order { get { return order; } } /// /// Gets the DisplayName. /// public string DisplayName { get; set; } /// /// Gets the Type of the property. /// public PropertyType Type { get; set; } /// /// Gets the Min value. /// public string Min { get { return min; } } /// /// Gets the Max value. /// public string Max { get { return max; } } /// /// Gets the Default value. /// public string Default { get { return defaultValue; } } } }