public static ComSourceInterfacesAttribute GetComSourceInterfaces(Type type) { ComSourceInterfacesAttribute comSourceInterfacesAttribute = null; var attributes = (ComSourceInterfacesAttribute[])type.GetCustomAttributes(typeof(ComSourceInterfacesAttribute), false); if (attributes.Length > 0) { comSourceInterfacesAttribute = attributes[0]; } return(comSourceInterfacesAttribute); }
public void Ctor_SourceInterface1_SourceInterfaceType2_SourceInterfaceType3_SourceInterfaceType4() { var attribute = new ComSourceInterfacesAttribute(typeof(int), typeof(string), typeof(bool), typeof(short)); Assert.Equal("System.Int32\0System.String\0System.Boolean\0System.Int16", attribute.Value); }
public void Ctor_SourceInterface1_SourceInterfaceType2() { var attribute = new ComSourceInterfacesAttribute(typeof(int), typeof(string)); Assert.Equal("System.Int32\0System.String", attribute.Value); }
public void Ctor_SourceInterface1() { var attribute = new ComSourceInterfacesAttribute(typeof(int)); Assert.Equal("System.Int32", attribute.Value); }
public void Ctor_SourceInterfaces(string sourceInterfaces) { var attribute = new ComSourceInterfacesAttribute(sourceInterfaces); Assert.Equal(sourceInterfaces, attribute.Value); }