public OutletMetaData(PatchMetaClass container, PropertyInfo property) { this.container = container; this.property = property; Attributes = property.GetCustomAttribute <OutletAttribute> (); Name = Attributes.Name ?? property.Name; }
public void MetaClassEnumerateOutletWithImplicitName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); var outlets = pm.Outlets; Assert.AreEqual(1, outlets.Length, "#1"); Assert.AreEqual("TestOutput", outlets [0].Name, "#2"); }
public void MetaClassEnumerateInletsWithImplicitName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); var inlets = pm.Inlets; Assert.AreEqual(1, inlets.Length, "#1"); Assert.AreEqual("Tst", inlets [0].Name, "#2"); }
public void MetaClassEnumerateInlets() { var pm = new PatchMetaClass(typeof(TestPatch)); var inlets = pm.Inlets; Assert.AreEqual(1, inlets.Length, "#1"); Assert.AreEqual("input", inlets [0].Name, "#2"); }
public void MetaClassEnumerateOutletWithImplicitName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); var outlets = pm.Outlets; Assert.AreEqual(1, outlets.Length, "#1"); Assert.AreEqual("TestOutput", outlets [0].Name, "#2"); }
public void MetaClassEnumerateInletsWithImplicitName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); var inlets = pm.Inlets; Assert.AreEqual(1, inlets.Length, "#1"); Assert.AreEqual("Tst", inlets [0].Name, "#2"); }
public void MetaClassEnumerateInlets() { var pm = new PatchMetaClass(typeof(TestPatch)); var inlets = pm.Inlets; Assert.AreEqual(1, inlets.Length, "#1"); Assert.AreEqual("input", inlets [0].Name, "#2"); }
public void MetaClassParsePatchName() { var pm = new PatchMetaClass(typeof(TestPatch)); Assert.AreEqual("Example", pm.Name); }
public void MetaClassParseImplicitPatchName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); Assert.AreEqual("TestPatchWithImplicitName", pm.Name); }
public InletMetaData(PatchMetaClass container, PropertyInfo property) { this.container = container; this.property = property; Attributes = property.GetCustomAttribute<InletAttribute> (); Name = Attributes.Name ?? property.Name; }
private void ProcessType(Type type, PatchAttribute pa) { PatchMetaClass meta = new PatchMetaClass(type); patches.Add(pa.Name, meta); }
private void ProcessType(Type type, PatchAttribute pa) { PatchMetaClass meta = new PatchMetaClass(type); patches.Add(pa.Name, meta); }
public void MetaClassParseImplicitPatchName() { var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName)); Assert.AreEqual("TestPatchWithImplicitName", pm.Name); }
public void MetaClassParsePatchName() { var pm = new PatchMetaClass(typeof(TestPatch)); Assert.AreEqual("Example", pm.Name); }