//Generated by the IDL-to-C#-compiler MiddCorIdl //Source: C:/project/MC/MinCorNet/Demo/Attribute/Attribute.idl //Sonntag, 16. Januar 2005, 22:47:28 using System; using System.Collections; using Middsol; //Types namespace Attribute { namespace GreetingsPackage { } } //Interfaces and Value Factories namespace Attribute { public interface Greetings : GreetingsOperations, Middsol.CORBA.Object, Middsol.CORBA.portable.IDLEntity { } } //Interface Operations and Value Types namespace Attribute { public interface GreetingsOperations { string Name { get; set; } string City { get; } string hello( ); } } //Helpers namespace Attribute { public class GreetingsHelper { private static string _id = "IDL:Attribute/Greetings: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(), "Greetings" ); return typeCode; } public static void insert( Middsol.CORBA.Any a, Greetings s ) { a.type( type()); write( a.create_output_stream(), s ); } public static Greetings extract( Middsol.CORBA.Any a ) { return read( a.create_input_stream() ); } public static void write( Middsol.CORBA.portable.OutputStream outpStream, Greetings s ) { outpStream.write_Object ((Middsol.CORBA.Object) s); } public static Greetings read( Middsol.CORBA.portable.InputStream inpStream ) { return narrow ( inpStream.read_Object() ); } public static Greetings narrow( Middsol.CORBA.Object obj ) { if( obj == null ) { return null; } if ( obj is Greetings ) { return (Greetings) obj; } if( obj._is_a( id() ) ) { _GreetingsStub stub = new _GreetingsStub(); stub._set_delegate(((Middsol.CORBA.portable.ObjectImpl)obj)._get_delegate()); return stub; } throw new Middsol.CORBA.BAD_PARAM("Narrow failed"); } } namespace GreetingsPackage { } } //Stubs and Value Default Factories namespace Attribute { public class _GreetingsStub : Middsol.CORBA.portable.ObjectImpl, Greetings { private string[] ids = {"IDL:Attribute/Greetings:1.0"}; public override string[] _ids() { return ids; } public string Name { set { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_set_Name", true ); outs.write_string( value ); ins = _invoke( outs ); return; } 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 ); } } } get { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_get_Name", true ); ins = _invoke( outs ); return ins.read_string(); } 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 string City { get { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "_get_City", true ); ins = _invoke( outs ); return ins.read_string(); } 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 string hello( ) { Middsol.CORBA.portable.InputStream ins = null; while( true ) { try { Middsol.CORBA.portable.OutputStream outs = _request( "hello", true ); 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 ); } } } } } //POA namespace Attribute { public abstract class GreetingsPOA : Middsol.PortableServer.Servant, GreetingsOperations, Middsol.CORBA.portable.InvokeHandler { private string[] ids = {"IDL:Attribute/Greetings:1.0"}; public override string[] _all_interfaces(Middsol.PortableServer.POA poa, byte[] objectId) { return ids; } public Greetings _this() { return GreetingsHelper.narrow( base._this_object( ) ); } public Greetings _this( Middsol.CORBA.ORB orb ) { return GreetingsHelper.narrow( base._this_object( orb ) ); } virtual public string Name { set{;} get{return (string)(System.Object) null;} } virtual public string City { get{return (string)(System.Object) null;} } virtual public string hello( ){ 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 "_set_Name": { this.Name = ins.read_string(); outs = resh.createReply(); break; } case "_get_Name": { string value = this.Name; outs = resh.createReply(); outs.write_string( value ); break; } case "_get_City": { string value = this.City; outs = resh.createReply(); outs.write_string( value ); break; } case "hello": { string result = this.hello( ); outs = resh.createReply(); outs.write_string( result ); break; } default: throw new Middsol.CORBA.BAD_OPERATION(); } return outs; } } } //POATie namespace Attribute { public class GreetingsPOATie : GreetingsPOA { public GreetingsPOATie( GreetingsOperations impl ) { this._impl = impl; } public GreetingsPOATie( GreetingsOperations impl, Middsol.PortableServer.POA poa ) { this._impl = impl; this._poa_tie = poa; } public GreetingsOperations _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 Name { set { ((GreetingsOperations)_impl).Name = value; } get { return ((GreetingsOperations)_impl).Name; } } override public string City { get { return ((GreetingsOperations)_impl).City; } } override public string hello( ) { return ((GreetingsOperations)_impl).hello( ); } private GreetingsOperations _impl = null; private Middsol.PortableServer.POA _poa_tie = null; } }