// <Snippet3>
 public virtual void ProcessBooks(IListContract <Library.IBookInfoContract> books)
 {
     _view.ProcessBooks(CollectionAdapters.ToIList <Library.IBookInfoContract,
                                                    LibraryContractsBase.BookInfo>(books,
                                                                                   LibraryContractsAddInAdapters.BookInfoAddInAdapter.ContractToViewAdapter,
                                                                                   LibraryContractsAddInAdapters.BookInfoAddInAdapter.ViewToContractAdapter));
 }
 public override IList <Operation> GetOperations()
 {
     return(CollectionAdapters.ToIList <IOperationContract, Operation>(
                contract.GetOperations(),
                OperationHostAdapters.ContractToViewAdapter,
                OperationHostAdapters.ViewToContractAdapter));
 }
Exemple #3
0
 public override IList <VParamType> Invoke(string roleName, string opName, IList <VParamType> parameters, VPort p, VCapability reqCap, VCapability respCap)
 {
     return(CollectionAdapters.ToIList <IParamType, VParamType>(_contract.Invoke(roleName, opName,
                                                                                 CollectionAdapters.ToIListContract <VParamType, IParamType>(parameters, BaseTypeAdapter.V2C, BaseTypeAdapter.C2V),
                                                                                 PortAdapter.V2C(p),
                                                                                 CapabilityAdapter.V2C(reqCap),
                                                                                 CapabilityAdapter.V2C(respCap)),
                                                                BaseTypeAdapter.C2V, BaseTypeAdapter.V2C));
 }
 public override IList <VParamType> ReturnValues()
 {
     return(CollectionAdapters.ToIList <IParamType, VParamType>(_contract.ReturnValues(), BaseTypeAdapter.C2V, BaseTypeAdapter.V2C));
 }
Exemple #5
0
 public void SetRoles(IPortInfo portInfo, IListContract <IRole> roles, IModule module)
 {
     _view.SetRoles(PortInfoAdapter.C2V(portInfo),
                    CollectionAdapters.ToIList <IRole, VRole>(roles, RoleAdapter.C2V, RoleAdapter.V2C),
                    ModuleAdapter.C2V(module));
 }
Exemple #6
0
 public IList <VPort> GetAllPorts()
 {
     return(CollectionAdapters.ToIList <IPort, VPort>(_contract.GetAllPorts(), PortAdapter.C2V, PortAdapter.V2C));
 }
Exemple #7
0
 public override IList <long> GetResourceUsage()
 {
     return(CollectionAdapters.ToIList <long>(_contract.GetResourceUsage()));
 }
Exemple #8
0
 public override IList <string> GetChangedAttributes()
 {
     return(CollectionAdapters.ToIList <string>(contract.GetChangedAttributes()));
 }
Exemple #9
0
 public override IList <Guid> GetObjectClassId()
 {
     return(CollectionAdapters.ToIList <Guid>(contract.GetObjectClassId()));
 }
Exemple #10
0
 public void AsyncReturn(string roleName, string opName, IListContract <IParamType> retVals, IPort p, ICapability respCap)
 {
     _view.AsyncReturn(roleName, opName,
                       CollectionAdapters.ToIList <IParamType, VParamType>(retVals, BaseTypeAdapter.C2V, BaseTypeAdapter.V2C),
                       PortAdapter.C2V(p), CapabilityAdapter.C2V(respCap));
 }
Exemple #11
0
 public override IList <VOperation> GetOperations()
 {
     return(CollectionAdapters.ToIList <IOperation, VOperation>(_contract.GetOperations(),
                                                                OperationAdapter.C2V, OperationAdapter.V2C));
 }
Exemple #12
0
 public override IList <VRole> GetRoles()
 {
     return(CollectionAdapters.ToIList <IRole, VRole>(_contract.GetRoles(), RoleAdapter.C2V, RoleAdapter.V2C));
 }
Exemple #13
0
 public virtual void ProcessBooks(IListContract <IBookInfoContract> books)
 {
     _view.ProcessBooks(CollectionAdapters.ToIList(books,
                                                   BookInfoAddInAdapter.ContractToViewAdapter,
                                                   BookInfoAddInAdapter.ViewToContractAdapter));
 }