public static PortType GetPartnerType(PortProfile profile) { PortType type = profile.GetPortType(); switch (type) { case PortType.DataInPort: return PortType.DataOutPort; case PortType.DataOutPort: return PortType.DataInPort; case PortType.ServiceProvider: return PortType.ServiceConsumer; case PortType.ServiceConsumer: return PortType.ServiceProvider; } throw new ArgumentException(); }
public static OutPortServiceMock CreateOutPortService(string name, string dataType) { var portProfile = new PortProfile() { name = name, connector_profiles = new ConnectorProfile[0], interfaces = new PortInterfaceProfile[0], owner = null, port_ref = null, properties = new[]{ NameValueExtension.Create("port.port_type","DataOutPort"), NameValueExtension.Create("dataport.data_type",dataType), NameValueExtension.Create("dataport.subscription_type","flush,new,periodic"), NameValueExtension.Create("dataport.dataflow_type","push,pull"), NameValueExtension.Create("dataport.interface_type","corba_cdr"), } }; var proxy = new MockProxy<OutPortServiceMock>(new OutPortServiceMock(portProfile)); return proxy.GetTransparentProxy(); }
public PortServiceMock(PortProfile prof) { _profile = prof; }
public OutPortServiceMock(PortProfile prof) : base(prof) { }
public InPortServiceMock(PortProfile prof, InPortCdr mock) : base(prof) { _inPortCdrMock = mock; }
///<exclude/> public bool Equals(PortProfile other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other._Name == (_Name) && other._Interfaces.SequenceEqual(_Interfaces) && other._PortRef == (_PortRef) && other._ConnectorProfiles.SequenceEqual(_ConnectorProfiles) && other._Owner == (_Owner) && other._Properties.SequenceEqual(_Properties); }