public static NativeDestinationOptions GetDestinationOptions(SessionHandle handle) { NativeCimSession session = MarshalledObject.FromPointer <NativeCimSession> (handle.DangerousGetHandle()); NativeDestinationOptions options = new NativeDestinationOptions(); if (session.DestinationOptions == IntPtr.Zero) { /* Setup Default Destination Options */ options.ServerName = session.ServerName; options.DestinationPort = 5985; } else { options = MarshalledObject.FromPointer <NativeDestinationOptions> (session.DestinationOptions); if (string.IsNullOrEmpty(options.ServerName)) { options.ServerName = session.ServerName; } if (options.DestinationPort == 0) { options.DestinationPort = 5985; } } return(options); }
/// <summary> /// This protected method is necessary for subclasses to /// make the <code>activeObject</code> callback to the group's /// monitor. The call is simply forwarded to the group's /// <code>ActivationMonitor</code>. /// </summary> /// <param name="id"> the object's identifier </param> /// <param name="mobj"> a marshalled object containing the remote object's stub </param> /// <exception cref="UnknownObjectException"> if object is not registered </exception> /// <exception cref="RemoteException"> if call informing monitor fails </exception> /// <exception cref="ActivationException"> if an activation error occurs /// @since 1.2 </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: protected void activeObject(ActivationID id, java.rmi.MarshalledObject<? extends java.rmi.Remote> mobj) throws ActivationException, java.rmi.activation.UnknownObjectException, java.rmi.RemoteException protected internal virtual void activeObject <T1>(ActivationID id, MarshalledObject <T1> mobj) where T1 : java.rmi.Remote { Monitor.ActiveObject(id, mobj); }