Simpl.Serialization.FieldDescriptor.AutomaticLazyGetCollectionOrMap C# (CSharp) Метод

AutomaticLazyGetCollectionOrMap() публичный Метод

public AutomaticLazyGetCollectionOrMap ( object root ) : Object
root object
Результат Object
        public Object AutomaticLazyGetCollectionOrMap(object root)
        {
            Object
            collection = null;

            collection = field.GetValue(root);
            if(collection == null)
            {
                collection = Activator.CreateInstance(Field.FieldType); //TODO: use collectionType.Instance but first have generic type parameter specification system in S.IM.PL
                field.SetValue(root, collection);
            }

            return collection;
        }