示例#1
0
 /// <summary>Creates new extented property info.</summary>
 /// <param name="owner">Type which owns described property.</param>
 /// <param name="address">Property name defined in owner type, usually aquired with <see cref="nameof"/> syntax.</param>
 /// <param name="staticInitializer">Static intializer invoked once after whole info abject is set.
 /// You can use existing initializers or wirte you own to perform any additional stuff needed when proprerty is define.</param>
 /// <param name="name">Name of the property displayed to frontend user. If name is not specified, property addres is used as a name.</param>
 /// <param name="info">Short info for frontend user about what this property represents.</param>
 /// <param name="description">Deatailed description about property usage.</param>
 /// <param name="constrains">Constrains object applayed each time an instance of the property is set to new value.</param>
 /// <param name="instanceInitializer">Intializer applayed each time new instance of the property is set.</param>
 public EPInfo(Type owner, string address, EPInitializer <EPInfo> staticInitializer = null, string name = null, string info = null, string description = null, PConstrains constrains = null, EPInitializer <EP> instanceInitializer = null)
 {
     this.owner               = owner;
     this.address             = address;
     this.name                = name ?? address;
     this.description         = description;
     this.constrains          = constrains;
     this.instanceInitializer = instanceInitializer;
     this.initializer         = staticInitializer;
     initializer?.initialize(this);
 }
示例#2
0
 public void Add(EPInitializer <T> initializer) => list.Add(initializer);