Exemple #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;
		}
Exemple #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;
        }