public PropertyEmitter CreateProperty(string name, PropertyAttributes attributes, Type propertyType, Type[] arguments)
        {
            var propEmitter = new PropertyEmitter(this, name, attributes, propertyType, arguments);

            properties.Add(propEmitter);
            return(propEmitter);
        }
        public PropertyEmitter CreateProperty(String name, PropertyAttributes attributes, Type propertyType)
        {
            PropertyEmitter propEmitter = new PropertyEmitter(this, name, attributes, propertyType);

            properties.Add(propEmitter);
            return(propEmitter);
        }
예제 #3
0
		public PropertyToGenerate(bool canRead, bool canWrite, PropertyEmitter emitter, MethodInfo getMethod,
		                          MethodInfo setMethod)
		{
			this.canRead = canRead;
			this.canWrite = canWrite;
			this.emitter = emitter;
			this.getMethod = getMethod;
			this.setMethod = setMethod;
		}
예제 #4
0
		protected void ReplicateNonInheritableAttributes(PropertyInfo propertyInfo, PropertyEmitter emitter)
		{
			object[] attrs = propertyInfo.GetCustomAttributes(false);

			foreach (Attribute attribute in attrs)
			{
				if (ShouldSkipAttributeReplication(attribute)) continue;

				emitter.DefineCustomAttribute(attribute);
			}
		}
		public void Add(PropertyEmitter property)
		{
			InnerList.Add(property);
		}
예제 #6
0
		public PropertyEmitter CreateProperty(String name, PropertyAttributes attributes, Type propertyType)
		{
			PropertyEmitter propEmitter = new PropertyEmitter(this, name, attributes, propertyType);
			properties.Add(propEmitter);
			return propEmitter;
		}