//Generated by the IDL-to-C#-compiler MiddCorIdl //Source: C:/project/MC/MinCorNet/Demo/Factory/Factory.idl //Sonntag, 16. Januar 2005, 22:47:41 using System; using System.Collections; using Middsol; //Types namespace Factory { namespace IGreetingsPackage { } namespace IGreetingsFriendsPackage { } namespace IGreetingsBusinessPackage { } namespace IGreetingFactoryPackage { public class GreetingExcp: Middsol.CORBA.UserException { public string strWhy; public int lErrorCode; public GreetingExcp() { } public GreetingExcp( string strWhy, int lErrorCode ) { this.strWhy = strWhy; this.lErrorCode = lErrorCode; } public GreetingExcp( string _reason, string strWhy, int lErrorCode ) { this.strWhy = strWhy; this.lErrorCode = lErrorCode; } } } } //Interfaces and Value Factories namespace Factory { public interface IGreetings : IGreetingsOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity { } public interface IGreetingsFriends : IGreetingsFriendsOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity, IGreetings { } public interface IGreetingsBusiness : IGreetingsBusinessOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity, IGreetings { } public interface IGreetingFactory : IGreetingFactoryOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity { } } //Interface Operations and Value Types namespace Factory { public interface IGreetingsOperations { string hello( string a_Name ); } public interface IGreetingsFriendsOperations: IGreetingsOperations { } public interface IGreetingsBusinessOperations: IGreetingsOperations { } public interface IGreetingFactoryOperations { IGreetings createIGreetings( string a_strNameOfInterface ); } } //Helpers namespace Factory { public class IGreetingsHelper { private static string _id = "IDL:Factory/IGreetings:1.0"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "IGreetings" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, IGreetings s ) { a.type( type()); write( a.create_output_stream(), s ); } public static IGreetings extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, IGreetings s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static IGreetings read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static IGreetings narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is IGreetings ) { return (IGreetings) obj; } if( obj._is_a( id() ) ) { _IGreetingsStub stub = new _IGreetingsStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace IGreetingsPackage { } public class IGreetingsFriendsHelper { private static string _id = "IDL:Factory/IGreetingsFriends:1.0"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "IGreetingsFriends" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, IGreetingsFriends s ) { a.type( type()); write( a.create_output_stream(), s ); } public static IGreetingsFriends extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, IGreetingsFriends s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static IGreetingsFriends read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static IGreetingsFriends narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is IGreetingsFriends ) { return (IGreetingsFriends) obj; } if( obj._is_a( id() ) ) { _IGreetingsFriendsStub stub = new _IGreetingsFriendsStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace IGreetingsFriendsPackage { } public class IGreetingsBusinessHelper { private static string _id = "IDL:Factory/IGreetingsBusiness:1.0"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "IGreetingsBusiness" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, IGreetingsBusiness s ) { a.type( type()); write( a.create_output_stream(), s ); } public static IGreetingsBusiness extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, IGreetingsBusiness s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static IGreetingsBusiness read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static IGreetingsBusiness narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is IGreetingsBusiness ) { return (IGreetingsBusiness) obj; } if( obj._is_a( id() ) ) { _IGreetingsBusinessStub stub = new _IGreetingsBusinessStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace IGreetingsBusinessPackage { } public class IGreetingFactoryHelper { private static string _id = "IDL:Factory/IGreetingFactory:1.0"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_interface_tc( id(), "IGreetingFactory" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, IGreetingFactory s ) { a.type( type()); write( a.create_output_stream(), s ); } public static IGreetingFactory extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, IGreetingFactory s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static IGreetingFactory read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static IGreetingFactory narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is IGreetingFactory ) { return (IGreetingFactory) obj; } if( obj._is_a( id() ) ) { _IGreetingFactoryStub stub = new _IGreetingFactoryStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace IGreetingFactoryPackage { public class GreetingExcpHelper { private static string _id = "IDL:Factory/IGreetingFactory/GreetingExcp:1.0"; public static string id() { return _id; } private static Middsol.CORBA.TypeCode _typeCode = null; private static bool _active = false; public static Middsol.CORBA.TypeCode type() { if ( _typeCode==null ) _typeCode = create_type(); return _typeCode; } public static Middsol.CORBA.TypeCode create_type() { lock( typeof(GreetingExcpHelper) ) { if ( _active ) { return Middsol.CORBA._ORB.ORB().create_recursive_tc( _id ); } _active = true; Middsol.CORBA.TypeCode member_typeCode = null; Middsol.CORBA.StructMember[] members = new Middsol.CORBA.StructMember[2]; member_typeCode = Middsol.CORBA._ORB.ORB().create_string_tc(0); members[0] = new Middsol.CORBA.StructMember( "strWhy", member_typeCode, null ); member_typeCode = Middsol.CORBA._ORB.ORB().get_primitive_tc( Middsol.CORBA.TCKind.tk_long ); members[1] = new Middsol.CORBA.StructMember( "lErrorCode", member_typeCode, null ); Middsol.CORBA.TypeCode typeCode = Middsol.CORBA._ORB.ORB().create_exception_tc( id(), "GreetingExcp", members ); _active = false; return typeCode; } } public static void insert( Middsol.CORBA.Any a, GreetingExcp s ) { a.type( type()); write( a.create_output_stream(), s ); } public static GreetingExcp extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, GreetingExcp s ) { if ( (System.Object)s == null ) { throw new Middsol.CORBA.BAD_PARAM(); } outpStream.write_string( id() ); outpStream.write_string( s.strWhy ); outpStream.write_long( s.lErrorCode ); } public static GreetingExcp read( Middsol.CORBA.portable.InputStream inpStream ) { inpStream.read_string(); GreetingExcp result = new GreetingExcp(); result.strWhy = inpStream.read_string(); result.lErrorCode = inpStream.read_long(); return result; } } } } //Stubs and Value Default Factories namespace Factory { public class _IGreetingsStub : Middsol.CORBA.portable.ObjectImpl, IGreetings { private string[] ids = {"IDL:Factory/IGreetings:1.0"}; public override string[] _ids() { return ids; } public string hello( string a_Name ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello", true ); outs.write_string( a_Name ); ins = _invoke( outs ); string result = ins.read_string(); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } public class _IGreetingsFriendsStub : Middsol.CORBA.portable.ObjectImpl, IGreetingsFriends { private string[] ids = {"IDL:Factory/IGreetingsFriends:1.0","IDL:Factory/IGreetings:1.0"}; public override string[] _ids() { return ids; } public string hello( string a_Name ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello", true ); outs.write_string( a_Name ); ins = _invoke( outs ); string result = ins.read_string(); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } public class _IGreetingsBusinessStub : Middsol.CORBA.portable.ObjectImpl, IGreetingsBusiness { private string[] ids = {"IDL:Factory/IGreetingsBusiness:1.0","IDL:Factory/IGreetings:1.0"}; public override string[] _ids() { return ids; } public string hello( string a_Name ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello", true ); outs.write_string( a_Name ); ins = _invoke( outs ); string result = ins.read_string(); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } public class _IGreetingFactoryStub : Middsol.CORBA.portable.ObjectImpl, IGreetingFactory { private string[] ids = {"IDL:Factory/IGreetingFactory:1.0"}; public override string[] _ids() { return ids; } public IGreetings createIGreetings( string a_strNameOfInterface ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "createIGreetings", true ); outs.write_string( a_strNameOfInterface ); ins = _invoke( outs ); IGreetings result = IGreetingsHelper.read( ins ); return result; } catch( Middsol.CORBA.portable.RemarshalException ) { } catch( Middsol.CORBA.portable.ApplicationException ax ) { String id = ax.getId(); if ( id == "IDL:Factory/IGreetingFactory/GreetingExcp:1.0" ) throw IGreetingFactoryPackage.GreetingExcpHelper.read( ax.getInputStream() ); else throw new Middsol.CORBA.MARSHAL ( id ); } finally { this._releaseReply( ins ); } } } } } //POA namespace Factory { public abstract class IGreetingsPOA : Middsol.PortableServer.Servant, IGreetingsOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"IDL:Factory/IGreetings:1.0"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public IGreetings _this() { return IGreetingsHelper.narrow( base._this_object( ) ); } public IGreetings _this( Middsol.CORBA.ORB orb ) { return IGreetingsHelper.narrow( base._this_object( orb ) ); } virtual public string hello( string a_Name ){ return (string)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "hello": { string a_Name = ins.read_string(); string result = this.hello( a_Name ); outs = resh.createReply(); outs.write_string( result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } public abstract class IGreetingsFriendsPOA : Middsol.PortableServer.Servant, IGreetingsFriendsOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"IDL:Factory/IGreetingsFriends:1.0","IDL:Factory/IGreetings:1.0"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public IGreetingsFriends _this() { return IGreetingsFriendsHelper.narrow( base._this_object( ) ); } public IGreetingsFriends _this( Middsol.CORBA.ORB orb ) { return IGreetingsFriendsHelper.narrow( base._this_object( orb ) ); } virtual public string hello( string a_Name ){ return (string)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "hello": { string a_Name = ins.read_string(); string result = this.hello( a_Name ); outs = resh.createReply(); outs.write_string( result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } public abstract class IGreetingsBusinessPOA : Middsol.PortableServer.Servant, IGreetingsBusinessOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"IDL:Factory/IGreetingsBusiness:1.0","IDL:Factory/IGreetings:1.0"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public IGreetingsBusiness _this() { return IGreetingsBusinessHelper.narrow( base._this_object( ) ); } public IGreetingsBusiness _this( Middsol.CORBA.ORB orb ) { return IGreetingsBusinessHelper.narrow( base._this_object( orb ) ); } virtual public string hello( string a_Name ){ return (string)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "hello": { string a_Name = ins.read_string(); string result = this.hello( a_Name ); outs = resh.createReply(); outs.write_string( result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } public abstract class IGreetingFactoryPOA : Middsol.PortableServer.Servant, IGreetingFactoryOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"IDL:Factory/IGreetingFactory:1.0"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public IGreetingFactory _this() { return IGreetingFactoryHelper.narrow( base._this_object( ) ); } public IGreetingFactory _this( Middsol.CORBA.ORB orb ) { return IGreetingFactoryHelper.narrow( base._this_object( orb ) ); } virtual public IGreetings createIGreetings( string a_strNameOfInterface ){ return (IGreetings)(System.Object) null ;} public Middsol.CORBA.portable.OutputStream _invoke( string method, Middsol.CORBA.portable.InputStream ins, Middsol.CORBA.portable.ResponseHandler resh ) { Middsol.CORBA.portable.OutputStream outs = null; switch( method ) { case "createIGreetings": { try { string a_strNameOfInterface = ins.read_string(); IGreetings result = this.createIGreetings( a_strNameOfInterface ); outs = resh.createReply(); IGreetingsHelper.write( outs, result ); } catch ( IGreetingFactoryPackage.GreetingExcp ex ) { outs = resh.createExceptionReply (); IGreetingFactoryPackage.GreetingExcpHelper.write( outs, ex ); } break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } } //POATie namespace Factory { public class IGreetingsPOATie : IGreetingsPOA { public IGreetingsPOATie( IGreetingsOperations impl ) { this._impl = impl; } public IGreetingsPOATie( IGreetingsOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public IGreetingsOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public string hello( string a_Name ) { return ((IGreetingsOperations)_impl).hello( a_Name ); } private IGreetingsOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } public class IGreetingsFriendsPOATie : IGreetingsFriendsPOA { public IGreetingsFriendsPOATie( IGreetingsFriendsOperations impl ) { this._impl = impl; } public IGreetingsFriendsPOATie( IGreetingsFriendsOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public IGreetingsFriendsOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public string hello( string a_Name ) { return ((IGreetingsOperations)_impl).hello( a_Name ); } private IGreetingsFriendsOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } public class IGreetingsBusinessPOATie : IGreetingsBusinessPOA { public IGreetingsBusinessPOATie( IGreetingsBusinessOperations impl ) { this._impl = impl; } public IGreetingsBusinessPOATie( IGreetingsBusinessOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public IGreetingsBusinessOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public string hello( string a_Name ) { return ((IGreetingsOperations)_impl).hello( a_Name ); } private IGreetingsBusinessOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } public class IGreetingFactoryPOATie : IGreetingFactoryPOA { public IGreetingFactoryPOATie( IGreetingFactoryOperations impl ) { this._impl = impl; } public IGreetingFactoryPOATie( IGreetingFactoryOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public IGreetingFactoryOperations _delegate { set { this._impl = value; } get { return this._impl; } } override public Middsol.PortableServer.POA _default_POA() { if(_poa_tie != null) { return _poa_tie; } else { return base._default_POA(); } } override public IGreetings createIGreetings( string a_strNameOfInterface ) { return ((IGreetingFactoryOperations)_impl).createIGreetings( a_strNameOfInterface ); } private IGreetingFactoryOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } }