Пример #1
0
 public OutletMetaData(PatchMetaClass container, PropertyInfo property)
 {
     this.container = container;
     this.property  = property;
     Attributes     = property.GetCustomAttribute <OutletAttribute> ();
     Name           = Attributes.Name ?? property.Name;
 }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }
Пример #4
0
        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");
        }
Пример #5
0
        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");
        }
Пример #6
0
        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");
        }
Пример #7
0
        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");
        }
Пример #8
0
 public void MetaClassParsePatchName()
 {
     var pm = new PatchMetaClass(typeof(TestPatch));
     Assert.AreEqual("Example", pm.Name);
 }
Пример #9
0
 public void MetaClassParseImplicitPatchName()
 {
     var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName));
     Assert.AreEqual("TestPatchWithImplicitName", pm.Name);
 }
Пример #10
0
 public InletMetaData(PatchMetaClass container, PropertyInfo property)
 {
     this.container = container;
     this.property = property;
     Attributes = property.GetCustomAttribute<InletAttribute> ();
     Name = Attributes.Name ?? property.Name;
 }
Пример #11
0
 private void ProcessType(Type type, PatchAttribute pa)
 {
     PatchMetaClass meta = new PatchMetaClass(type);
     patches.Add(pa.Name, meta);
 }
Пример #12
0
        private void ProcessType(Type type, PatchAttribute pa)
        {
            PatchMetaClass meta = new PatchMetaClass(type);

            patches.Add(pa.Name, meta);
        }
Пример #13
0
        public void MetaClassParseImplicitPatchName()
        {
            var pm = new PatchMetaClass(typeof(TestPatchWithImplicitName));

            Assert.AreEqual("TestPatchWithImplicitName", pm.Name);
        }
Пример #14
0
        public void MetaClassParsePatchName()
        {
            var pm = new PatchMetaClass(typeof(TestPatch));

            Assert.AreEqual("Example", pm.Name);
        }