Esempio n. 1
0
		public CollectionInfo(NamingConventions conventions, TypeInfo owner, string name, string contents,
		                      bool lazy, bool readOnly)
			: base(conventions, owner, name, "ObservableList<" + contents + ">", false, lazy)
		{
			Contract.Requires(!string.IsNullOrEmpty(contents));

			ContentsType = new BaseFieldInfo(conventions, "Items", contents);
			Contents = contents;
			ReadOnly = false; // !lazy; <= Needed for serializationa
			ExposeAsReadOnly = readOnly;

			Setter = null;
			WithSetter = null;
			validator = null;
			Getter.TypeName = ExposedTypeName;
		}
Esempio n. 2
0
        public CollectionInfo(NamingConventions conventions, TypeInfo owner, string name, string contents,
                              bool lazy, bool readOnly)
            : base(conventions, owner, name, "ObservableList<" + contents + ">", false, lazy)
        {
            Contract.Requires(!string.IsNullOrEmpty(contents));

            ContentsType     = new BaseFieldInfo(conventions, "Items", contents);
            Contents         = contents;
            ReadOnly         = false;     // !lazy; <= Needed for serializationa
            ExposeAsReadOnly = readOnly;

            Setter          = null;
            WithSetter      = null;
            validator       = null;
            Getter.TypeName = ExposedTypeName;
        }