public RTObjectMock(ComponentProfile prof, List<PortService> ports) { _profile = prof; _ports = ports; var proxy = new MockProxy<ExecutionContextMock>(new ExecutionContextMock()); _execs = new List<ExecutionContext>() { proxy.GetTransparentProxy() }; State = LifeCycleState.INACTIVE_STATE; }
public static RTObjectMock CreateRTObject(string typeName, string instanceName, params PortService[] ports) { var profile = new ComponentProfile() { category = "", instance_name = instanceName, description = "", type_name = typeName, vendor = "", version = "", port_profiles = ports.Select(p => p.get_port_profile()).ToArray(), parent = null, properties = new NameValue[0] }; var proxy = new MockProxy<RTObjectMock>(new RTObjectMock(profile, ports.ToList())); return proxy.GetTransparentProxy(); }
///<exclude/> public bool Equals(ComponentProfile other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other._InstanceName == (_InstanceName) && other._TypeName == (_TypeName) && other._Description == (_Description) && other._Version == (_Version) && other._Vendor == (_Vendor) && other._Category == (_Category) && other._PortProfiles.SequenceEqual(_PortProfiles) && other._Parent == (_Parent) && other._Properties.SequenceEqual(_Properties); }