static async Task CallLogin(HttpClient client, JsonResponseConvert jsonResponseConvert) { string queryLoginServlet = "http://membersim.bseindia.com/stocks/LoginServlet?USBackOfficeId=&USLOGINID=SER_CT2-T9072&USPassword=ser.123456&USTransactionPassword=&version=1.3044&SecuritiesMaxSequenceId=1&NSEContractsMaxSequenceId=82&NcdexContractsMaxSequenceId=60&MCXContractsMaxSequenceId=139&BSEContractsMaxSequenceId=1&BSECurrencyContractsMaxSequenceId=1&NSECurrencyContractsMaxSequenceId=2125&enable2FA=Y&VenderCode=8_SER&SessionKey=&Thick Client=Y"; string query1 = QueryStringHelper.GetQueryString(new LoginServletModel()); Console.Write(query1); Console.WriteLine(); Console.WriteLine(); var construct = ConstructorHelper.GetConstructorData(new LoginServletModel()); Console.Write(construct); // query1 = "http://membersim.bseindia.com/stocks/LoginServlet?" + query1; bool equal = query1.Equals(queryLoginServlet); //CheckIdentity(queryLoginServlet, query1); var len = query1.Length; var other = query1.Substring(66); /* string loginServletResponse = await CallApi(client, queryLoginServlet); * LoginServletResponse deserializedLoginServletResponse = (LoginServletResponse)jsonResponseConvert.Deserialize(typeof(LoginServletResponse), loginServletResponse); * * string queryAuthenticationMode = "http://membersim.bseindia.com/stocks/AuthenticationMode?verificationMode=1&USLOGINID=SER_CT2-T9072&SessionKey=&Thick Client=Y"; * string authenticationModeResponse = await CallApi(client, queryAuthenticationMode); * AuthenticationModeResponse deserializedAuthenticationModeResponse = (AuthenticationModeResponse)jsonResponseConvert.Deserialize(typeof(AuthenticationModeResponse), authenticationModeResponse, '|'); */ }
private static bool IsDeepClassEligibleType( Type genericType, string fieldName, FieldInfo optionalField, Attribute[] annotations, StatementCompileTimeServices services) { if (!ConstructorHelper.HasDefaultConstructor(genericType)) { return(false); } try { JsonForgeFactoryBuiltinClassTyped.INSTANCE.Forge( genericType, fieldName, optionalField, EmptyDictionary <Type, JsonApplicationClassSerializationDesc> .Instance, annotations, services); return(false); } catch (UnsupportedOperationException) { return(true); } }
public object New( string typeName, object[] args) { var type = TypeHelper.ResolveType(typeName, true); return(ConstructorHelper.InvokeConstructor(type, args)); }
public void Spec02() { var taskItem = ConstructorHelper.CreateTaskItem(@"..\..\packages\library\file.js", @"path\file.js"); var actual = new TaskFile(@"D:\solution\source\project", taskItem); I.Expect(actual.Absolute).ToBe(@"D:\solution\source\project\..\..\packages\library\file.js"); I.Expect(actual.Virtual).ToBe(@"\path\file.js"); }
/// <summary> /// Get or creates in place constructor delegate. /// </summary> /// <param name="i"></param> /// <param name="inplaceCtorType"></param> /// <returns></returns> private static Delegate GetConstructor(int i, Type inplaceCtorType) { Debug.Assert(i < MaximumConstructorParams); if (Constructors == null) { Constructors = new Delegate[MaximumConstructorParams]; } return(Constructors[i] ?? (Constructors[i] = ConstructorHelper <T> .CreateInPlaceConstructor(inplaceCtorType))); }
public void Spec03() { try { ConstructorHelper.CreateJSLint("var JSLINT = { edition: '3000-01-01' };"); using (new JSLintContext()) { } } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec04() { try { ConstructorHelper.CreateJSLint(string.Format("var JSLINT = {{ edition: '{0}' }};", AssemblyInfo.Edition)); using (new JSLintContext()) { } } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec01() { try { ConstructorHelper.CreateJSLint("var JSLINT = { edition: '2000-01-01' };"); var exception = I.Expect(() => { using (new JSLintContext()) { } }).ToThrow(); I.Expect(exception.Message).ToContain("edition"); } finally { ConstructorHelper.DeleteJSLint(); } }
public void Spec02() { try { ConstructorHelper.CreateJSLint("not.actually.jslint;"); using (new JSLintContext()) { } Assert.True(false, "Expected exception given invalid JSLint file."); } catch { } finally { ConstructorHelper.DeleteJSLint(); } }
public ActionResult SavePoll(PollWrapper configPoll, List <PollUnit> poll, Boolean?hasUser) { try { if (Session["user"] != null) { configPoll.UserId = ((dynamic)Session["user"]).Id; } var project = ConstructorHelper.Save(configPoll, poll); return(new JsonResult() { Data = new { project.UrlCode } }); } catch (Exception ex) { Response.StatusCode = 400; return(new JsonResult() { Data = null }); } }
public object New(object[] args) { return(ConstructorHelper.InvokeConstructor(Type, args)); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException(typeof(BasicJsonSerializer), type => type == typeof(RecyclableMemoryStreamManager) ? MemoryStreamInstances.MemoryStream : null); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException <ObjectHashSetSerialization <Identity> >(); }
public void Create() { ConstructorHelper.ConstructorMustThrowArgumentNullException <WordOccurenceFactory>(); Assert.IsNotNull(instance); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException <ListSerialization <MainDataOne> >(); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException <SingleItemSerialization <Identity> >(); }
public static T GetConstructorOrDefault <T>(this Type type, Expression <T> expression) { return(ConstructorHelper <T> .GetConstructorOrDefault(type, expression)); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException <JObjectSerialiser>(type => type == typeof(RecyclableMemoryStreamManager) ? MemoryStreamInstances.MemoryStream : null); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException(typeof(BasicJsonSerializer), MemoryStreamInstances.MemoryStream); }
public void Construct() { ConstructorHelper.ConstructorMustThrowArgumentNullException <ObservableTimer>(); }