コード例 #1
0
 internal static void RegisterAsKnown(DependencyProperty dependencyProperty, byte byteVal, PropertyValidity propertyValidity)
 {
     if (dependencyProperty == null)
     {
         throw new ArgumentNullException("dependencyProperty");
     }
     if (knownProperties[byteVal] != null)
     {
         throw new InvalidOperationException(SR.GetString("Error_AlreadyRegisteredAs", new object[] { knownProperties[byteVal].dependencyProperty.ToString() }));
     }
     dependencyProperty.KnownIndex = byteVal;
     knownProperties[byteVal]      = new KnownDependencyProperty(dependencyProperty, propertyValidity);
 }
コード例 #2
0
        internal static void RegisterAsKnown(DependencyProperty dependencyProperty, byte byteVal, PropertyValidity propertyValidity)
        {
            if (dependencyProperty == null)
                throw new ArgumentNullException("dependencyProperty");
            if (knownProperties[byteVal] != null)
            {
                throw new InvalidOperationException(SR.GetString(SR.Error_AlreadyRegisteredAs, knownProperties[byteVal].dependencyProperty.ToString()));
            }

            dependencyProperty.KnownIndex = byteVal;
            knownProperties[byteVal] = new KnownDependencyProperty(dependencyProperty, propertyValidity);
        }