Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

.net Runtime WCF service caller, this libary support complex format

License

Notifications You must be signed in to change notification settings

mbasij1/DotNetDynamicServiceCaller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Are you want invoke a service runtime, are you have problem to use roslyn for invoke runtime a service.
this libary help you to call a WCF service runtime and support all complex format,
currently just support http services.
currently just support WCF service.
------------------
EXAMPLE: Call Complex Method
    ProxyClient proxyclient = new ProxyClient(
              new Uri("http://localhost:8183/Service1.svc")); 
    Dictionary<string, object> res;
    string json;
    Dictionary<string, object> input;

    var method = proxyclient.GetMethod("ComplexInputTest");
    var request = method.CreateRequest();

    var argumant = method.GetArgumant("input1");
    var temp = argumant.Type.CreateComplexInstance();
    argumant.Type.GetPropery("Datetime").SetValue(temp, DateTime.Now);
    argumant.Type.GetPropery("INTValue").SetValue(temp, 0);
    argumant.Type.GetPropery("Value").SetValue(temp, false);
    argumant.SetValue(request, temp);


    argumant = method.GetArgumant("input2");
    temp = argumant.Type.CreateComplexInstance();
    argumant.Type.GetPropery("Name").SetValue(temp, "Hello");
    argumant.SetValue(request, temp);

    res = proxyclient.Call(request);
    json = Newtonsoft.Json.JsonConvert.SerializeObject(res);
    Console.WriteLine(json);
    Console.WriteLine("----------------------------");

About

.net Runtime WCF service caller, this libary support complex format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages