예제 #1
0
        internal MutableModelSet <T> GetSet <T>(MutableObjectBase obj, ModelProperty property)
        {
            Debug.Assert(property.IsCollection);
            var slot = obj.MId.Descriptor.GetSlot(property);

            return(MutableModelSet <T> .FromGreenList(obj, slot));
        }
예제 #2
0
        protected MutableModelSet <T> GetSet <T>(ModelProperty property, ref MutableModelSet <T> value)
        {
            MutableModelSet <T> result = value;

            if (result == null)
            {
                result = this.model.GetSet <T>(this, property);
                result = Interlocked.CompareExchange(ref value, result, null) ?? result;
            }
            return(result);
        }