nikhilk / dynamicrest Goto Github PK
View Code? Open in Web Editor NEWREST service access using C# 4.0 dynamic programming
Home Page: http://www.nikhilk.net/CSharp-Dynamic-Programming-JSON.aspx
License: BSD 3-Clause "New" or "Revised" License
REST service access using C# 4.0 dynamic programming
Home Page: http://www.nikhilk.net/CSharp-Dynamic-Programming-JSON.aspx
License: BSD 3-Clause "New" or "Revised" License
JsonWriter.EscapeString (line +87) checks for \r twice, doesn't check \n.
JsonReader.ReadString doesn't decode the \n, \r or \t encoded by the above method.
Hey,
I was doing a little playing around with you're code, and when using the Network Credentials, it actually looses the credentials when it remakes the RestClient in the TryGetMember Function in RestClient.cs.
To fix this, I added the following:
if (_credentials != null)
operationGroupClient._credentials = _credentials;
The function as a whole:
public override bool TryGetMember(GetMemberBinder binder, out object result) {
if (_parameters == null) {
_parameters = new Dictionary<string, object>();
}
object value;
if (_parameters.TryGetValue(binder.Name, out value)) {
result = value;
return true;
}
string operationGroup = binder.Name;
if (_operationGroup != null) {
operationGroup = _operationGroup + "." + operationGroup;
}
RestClient operationGroupClient =
new RestClient(_uriFormat, _service, operationGroup, _parameters);
if (_credentials != null)
operationGroupClient._credentials = _credentials;
result = operationGroupClient;
return true;
}
Just thought I'd contribute back.
Thank You,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.