コード例 #1
0
        /// <summary>
        /// Check, that the correct interface type attribute has been placed.
        /// </summary>
        protected void CheckInterfaceAttr(Type testType, IdlTypeInterface expected)
        {
            object[] ifAttrs = testType.GetCustomAttributes(typeof(InterfaceTypeAttribute),
                                                            false);
            Assert.AreEqual(1, ifAttrs.Length, "wrong number of InterfaceTypeAttribute");
            InterfaceTypeAttribute ifAttr = (InterfaceTypeAttribute)ifAttrs[0];

            Assert.AreEqual(expected,
                            ifAttr.IdlType, "wrong ifattr");
        }
コード例 #2
0
ファイル: Tests.cs プロジェクト: JnS-Software-LLC/iiop-net
 private void CheckInterfaceDefinitions(string ifModifier, 
                                        IdlTypeInterface ifAttrVal) {
     MemoryStream testSource = new MemoryStream();
     StreamWriter writer = CreateSourceWriter(testSource);
     try {
         WriteIdlTestInterfaceToStream(writer, ifModifier);
         testSource.Seek(0, SeekOrigin.Begin);
         Assembly result = CreateIdl(testSource, GetAssemblyName());
                    
         // check if interface is correctly created
         Type ifType = result.GetType("testmod.Test", true);
         CheckPublicInstanceMethodPresent(ifType, "EchoOctet", 
                                          typeof(System.Byte), new Type[] { typeof(System.Byte) });
         CheckRepId(ifType, "IDL:testmod/Test:1.0");
         CheckInterfaceAttr(ifType, ifAttrVal);
         CheckIIdlEntityInheritance(ifType);            
     } finally {
         writer.Close();
     }
 }
コード例 #3
0
 /// <summary>
 /// Check, that the correct interface type attribute has been placed.
 /// </summary>
 protected void CheckInterfaceAttr(Type testType, IdlTypeInterface expected)
 {
     object[] ifAttrs = testType.GetCustomAttributes(typeof(InterfaceTypeAttribute),
                                                     false);
     Assert.AreEqual(1, ifAttrs.Length, "wrong number of InterfaceTypeAttribute");
     InterfaceTypeAttribute ifAttr = (InterfaceTypeAttribute)ifAttrs[0];
     Assert.AreEqual(expected,
                            ifAttr.IdlType, "wrong ifattr");
 }
コード例 #4
0
ファイル: IDLAttributes.cs プロジェクト: divyang4481/IIOPNet
 public InterfaceTypeAttribute(IdlTypeInterface idlType)
 {
     m_idlType = idlType;
 }
コード例 #5
0
 public InterfaceTypeAttribute(IdlTypeInterface idlType) {
     m_idlType = idlType;
 }