示例#1
0
    public RestfulTask requestSecurityAnalyticalOutput(SecurityAnalyticalMeasureRequest srp)
    {
        responseMsg = null;
        enterpriseMessageBusInterface2 = new Bondedge.API(msgBus, rabbitUser, rabbitPwd);
        enterpriseMessageBusInterface2.RegisterClient(srp.GetUser(), Callback);


        //tranlsate client message to message bus message
        srp.SetID(srp.ID != Guid.Empty ? srp.ID : Guid.NewGuid());

        //place the message on the bus
        enterpriseMessageBusInterface2.SendRequest(srp);


        //<test> pass back success right now
        return new RestfulTask() { status = restfulTaskStatus.success, msg = "" };


    }
示例#2
0
    public ITaskStatus requestSecurity(SecurityRequest srp)
    {
        emReplyMessage = null;
        //access to the message bus, of course parms grabbed from .config or data store
        enterpriseMessageBusInterface2 = new Bondedge.API(msgBus,rabbitUser,rabbitPwd);
        enterpriseMessageBusInterface2.RegisterClient(srp.GetUser(), Callback);
        

        //tranlsate client message to message bus message
        Domain.IRequest domainRequestMessage = OpenAPIToServiceBus.MessageTranslators.simpleToEnterpriseMessage(srp.Securities[0].Identifier, (int)srp.Securities[0].AsOfDate, 1.0);
        domainRequestMessage.SetID(srp.ID != Guid.Empty ? srp.ID : Guid.NewGuid());

       //place the message on the bus
        enterpriseMessageBusInterface2.SendRequest(domainRequestMessage);

        //<test> pass back success right now
        return new TaskStatus { Status = TASKSTATUS.Complete, Id = 1, ErrorCode = ERRORCODES.None, Message = "" };

    }
示例#3
0
 public RestfulTask requestSecurityStaticCashFlow(SecurityCashFlowRequest srp)
 {
     responseMsg = null;
     enterpriseMessageBusInterface2 = new Bondedge.API(msgBus, rabbitUser, rabbitPwd);
     enterpriseMessageBusInterface2.RegisterClient(srp.GetUser(), Callback);
     srp.SetID(srp.ID != Guid.Empty ? srp.ID : Guid.NewGuid());
     enterpriseMessageBusInterface2.SendRequest(srp);
     return new RestfulTask { status = restfulTaskStatus.success };
 }