public virtual bool equivalent(omg.org.CORBA.TypeCode tc) { if (tc.kind() != kind()) { return false; } return true; }
public UnionTC(string repositoryID, string name, omg.org.CORBA.TypeCode discriminatorType, int defaultCase, UnionSwitchCase[] switchCases) : base(TCKind.tk_union) { Initalize(repositoryID, name, discriminatorType, defaultCase, switchCases); }
public void Initalize(string repositoryID, string name, omg.org.CORBA.TypeCode discriminatorType, int defaultCase, UnionSwitchCase[] switchCases) { m_id = repositoryID; m_name = name; m_discriminatorType = discriminatorType; m_defaultCase = defaultCase; m_members = switchCases; }
/// <summary> /// insert a codeset service context into the service context list. /// </summary> internal static void InsertCodeSetServiceContext(omg.org.IOP.ServiceContextList contexts, int charSet, int wcharSet) { omg.org.IOP.ServiceContext context = CreateServiceContext(charSet, wcharSet); contexts.AddServiceContext(context); }
/// <summary> /// create a codeSetServiceContext from the service context with the specified id. /// </summary> /// <param name="svcContext"></param> internal CodeSetServiceContext(omg.org.IOP.ServiceContext svcContext) { Deserialise(svcContext.context_data); }
public void write_TypeCode(omg.org.CORBA.TypeCode val) { Marshal(ReflectionHelper.CorbaTypeCodeType, AttributeExtCollection.EmptyCollection, val, m_cdrOut); }
/// <summary> /// finds the code set service context among the collection of received service contexts. /// </summary> internal static CodeSetServiceContext FindCodeSetServiceContext(omg.org.IOP.ServiceContextList contexts) { if (contexts.ContainsServiceContext(SERVICE_ID)) { omg.org.IOP.ServiceContext context = contexts.GetServiceContext(SERVICE_ID); return new CodeSetServiceContext(context); } else { return null; } }
/// <summary>gets the CLS type for the Typecode</summary> public static Type GetTypeForTypeCode(omg.org.CORBA.TypeCode typeCode) { if (!(typeCode is omg.org.CORBA.TypeCodeImpl)) { throw new INTERNAL(567, CompletionStatus.Completed_MayBe); } else { return (typeCode as TypeCodeImpl).GetClsForTypeCode(); } }
public static AttributeExtCollection GetAttrsForTypeCode(omg.org.CORBA.TypeCode typeCode) { if (!(typeCode is omg.org.CORBA.TypeCodeImpl)) { return AttributeExtCollection.EmptyCollection; } else { return (typeCode as TypeCodeImpl).GetClsAttributesForTypeCode(); } }
internal SslConnectionListener(SecurityAssociationOptions requiredOptions, SecurityAssociationOptions supportedOptions, IServerSideAuthentication serverAuth, omg.org.IOP.Codec codec) { m_codec = codec; if (((requiredOptions & SecurityAssociationOptions.NoProtection) > 0) && (((supportedOptions & SecurityAssociationOptions.EstablishTrustInTarget) > 0) || ((supportedOptions & SecurityAssociationOptions.EstablishTrustInClient) > 0))) { throw new ArgumentException("unsupported options combination: required no protection and supported EstablishTrustInTarget/Client"); } SecureProtocol protocol = SecureProtocol.None; SslAlgorithms allowedCiphers = SslAlgorithms.ALL; if (((supportedOptions & SecurityAssociationOptions.EstablishTrustInTarget) > 0) || ((supportedOptions & SecurityAssociationOptions.EstablishTrustInClient) > 0)) { protocol = SecureProtocol.Tls1 | SecureProtocol.Ssl3; allowedCiphers = SslAlgorithms.SECURE_CIPHERS; m_isSecured = true; } CredentialVerification clientVerification = CredentialVerification.None; CertVerifyEventHandler verifyClient = null; SecurityFlags authFlags = SecurityFlags.Default; if (((supportedOptions & SecurityAssociationOptions.EstablishTrustInClient) > 0) || ((requiredOptions & SecurityAssociationOptions.EstablishTrustInClient) > 0)) { clientVerification = CredentialVerification.Manual; verifyClient = new CertVerifyEventHandler(this.CheckClientCertAtServer); } if ((requiredOptions & SecurityAssociationOptions.EstablishTrustInClient) > 0) { authFlags = SecurityFlags.MutualAuthentication; } m_sslOpts = new SecurityOptions(protocol, serverAuth.GetServerCertificate(), ConnectionEnd.Server, clientVerification, verifyClient, null, authFlags, allowedCiphers, null); m_serverAuth = serverAuth; m_supportedOptions = supportedOptions; m_requiredOptions = requiredOptions; }
public void establish_components(omg.org.PortableInterceptor.IORInfo iorInfo) { iorInfo.add_ior_component(m_tc); }
public TypeCode create_value_tc([StringValue] [WideChar(false)] string id, [StringValue] [WideChar(false)] string name, short type_modifier, omg.org.CORBA.TypeCode concrete_base, [IdlSequence(0L)] ValueMember[] members) { return new ValueTypeTC(id, name, members, concrete_base, type_modifier); }
public object decode_value ([IdlSequence(0L)] byte[] data, omg.org.CORBA.TypeCode tc) { CdrEncapsulationInputStream inputStream = new CdrEncapsulationInputStream(data, m_version); Type marshalAs = ((TypeCodeImpl)tc).GetClsForTypeCode(); AttributeExtCollection marshalAsAttrs = ((TypeCodeImpl)tc).GetClsAttributesForTypeCode(); Serializer ser = m_serFactory.Create(marshalAs, marshalAsAttrs); return ser.Deserialize(inputStream); }
public UnknownSystemException(int minor, omg.org.CORBA.CompletionStatus status) : base(System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.FullName, minor, status) { }
/// <summary> /// returns the deserialised data of the first component with the given tag or null, if not found. /// Assumes, that the componentData is encapsulated in a cdr encapsulation. The secound argument /// specifies, how the data inside the encapsulation looks like. /// </summary> public object GetComponentData(int tag, Codec codec, omg.org.CORBA.TypeCode componentDataType) { object result = null; object resultComp = GetComponentInternal(tag); if (resultComp != null) { return codec.decode_value(((TaggedComponent)resultComp).component_data, componentDataType); } return result; }
private void SetupChannelData(string hostName, int port, omg.org.IOP.Codec codec, TaggedComponent[] additionalComponents) { IiopChannelData newChannelData = new IiopChannelData(hostName, port); newChannelData.AddAdditionalTaggedComponent( Services.CodeSetService.CreateDefaultCodesetComponent(codec)); if ((additionalComponents != null) && (additionalComponents.Length > 0)) { newChannelData.AddAdditionalTaggedComponents(additionalComponents); } m_channelData = newChannelData; }