private DependencyProperty(string name, Type propertyType, Type ownerType, PropertyMetadata defaultMetadata, ValidateValueCallback validateValueCallback) { _name = name; _propertyType = propertyType; _ownerType = ownerType; _defaultMetadata = defaultMetadata; _validateValueCallback = validateValueCallback; Flags flags = default(Flags); lock (Synchronized) { flags = (Flags)GetUniqueGlobalIndex(ownerType, name); RegisteredPropertyList.Add(this); } if (propertyType.IsValueType) { flags |= Flags.IsValueType; } if (propertyType == typeof(object)) { flags |= Flags.IsObjectType; } if (typeof(Freezable).IsAssignableFrom(propertyType)) { flags |= Flags.IsFreezableType; } if (propertyType == typeof(string)) { flags |= Flags.IsStringType; } _packedData = flags; }
internal static void RegisterInternal(LinqPropertyBase linqProperty) { RegisteredPropertyList.Add(linqProperty); linqProperty.BuildDependentPropertyChain(); }
// // All table datastructures read-lock-free/write-lock // AddEventDependent writes the datastructures, locks set by callers // // This method // 1. Adds an EventDependent to the EventDependents list. This is used // to lookup events in styles during event routing. // internal static void AddEventDependent( int childIndex, EventHandlersStore eventHandlersStore, ref ItemStructList<ChildEventDependent> eventDependents) { if (eventHandlersStore != null) { Debug.Assert(childIndex >= 0); ChildEventDependent dependent = new ChildEventDependent(); dependent.ChildIndex = childIndex; dependent.EventHandlersStore = eventHandlersStore; eventDependents.Add(ref dependent); } }