public static int TestOutParamInt(IGenericMethods i) { int value; i.OutParam <int>(out value); return(value); }
public static string TestOutParamString(IGenericMethods i) { string value; i.OutParam <string>(out value); return(value); }
public static object[] GoWild(IGenericMethods i, bool first, string second, IList <int> value) { double obj; IEnumerable <string> actualSecond = Yielder(second); int len = i.Wild <string, double, int>(first, ref actualSecond, out obj, value); object[] result = new object[len]; result[0] = (object)obj; return(result); }
public void LinkedMethodsTest12() { BeethovenFactory beethovenFactory = new BeethovenFactory(); IGenericMethods instance = beethovenFactory.Generate <IGenericMethods>( LinkedMethodsReturnValue.Create <IGenericMethods>(nameof(IGenericMethods.Simple)) .Func(() => true) .FlowControl(() => false) .Func(() => false)); Assert.AreEqual(true, instance.Simple <bool>()); }
public void GenericSimpleTest4() { GenericMethods2 genericMethods2 = new GenericMethods2(); BeethovenFactory beethovenFactory = new BeethovenFactory(); IGenericMethods instance = beethovenFactory.Generate <IGenericMethods>( FuncMethod.Create("Simple", genericMethods2.SimpleString), FuncMethod.Create("Simple", genericMethods2.SimpleInt), genericMethods2); Assert.AreEqual(5, instance.Simple <int>()); Assert.AreEqual("abcd", instance.Simple <string>()); }
//Constructor /// <summary> /// Constructor Name : AlertAPIServices /// Author : Pratik Soni /// Creation Date : 14 Feb 2018 /// Purpose : To create instant of APIHelper class /// Revision : /// </summary> public BookYourMove(IAPIHelper apiHelper, IGenericMethods genericMethods, AlertJSONGenerator.IBookYourMoveGenerator bookYourMoveGenerator, IResourceManagerFactory resourceManager, ILogger logger) { this.apiHelper = apiHelper; this.genericMethods = genericMethods; this.bookYourMoveGenerator = bookYourMoveGenerator; this.resourceManager = resourceManager; this.logger = logger; }
public void GenericSimpleTest2() { BeethovenFactory beethovenFactory = new BeethovenFactory(); IGenericMethods instance = beethovenFactory.Generate <IGenericMethods>( FuncMethod.Create("Simple", () => "abcd"), FuncMethod.Create("Simple", () => 5), FuncMethod.Create("Simple", () => (short)0)); Assert.AreEqual(5, instance.Simple <int>()); Assert.AreEqual(0, instance.Simple <short>()); Assert.AreEqual("abcd", instance.Simple <string>()); }
//Constructor /// <summary> /// Constructor Name : BeginningOfDayOfServiceCheckIn /// Author : Pratik Soni /// Creation Date : 28 Feb 2018 /// Purpose : To create instant of APIHelper class /// Revision : /// </summary> public EndOfServiceCheckIn(IAPIHelper apiHelper, IGenericMethods genericMethods, AlertJSONGenerator.IEndOfServiceCheckInGenerator endOfServiceCheckInGenerator, IResourceManagerFactory resourceManager, ILogger logger) { this.apiHelper = apiHelper; this.genericMethods = genericMethods; this.endOfServiceCheckInGenerator = endOfServiceCheckInGenerator; this.resourceManager = resourceManager; this.logger = logger; }
//Constructor /// <summary> /// Constructor Name : BeginningOfDayOfServiceCheckIn /// Author : Pratik Soni /// Creation Date : 28 Feb 2018 /// Purpose : To create instant of APIHelper class /// Revision : /// </summary> public BeginningOfDayOfServiceCheckIn(IAPIHelper apiHelper, IGenericMethods genericMethods, AlertJSONGenerator.IBeginningOfDayOfServiceGenerator beginningOfDayOfServiceGenerator, IResourceManagerFactory resourceManager, ILogger logger) { this.apiHelper = apiHelper; this.genericMethods = genericMethods; this.beginningOfDayOfServiceGenerator = beginningOfDayOfServiceGenerator; this.resourceManager = resourceManager; this.logger = logger; }
/// <summary> /// Constructor Name : FinalPaymentMade /// Author : Ranjana Singh /// Creation Date : 28 Feb 2018 /// Purpose : To create instance of FinalPaymentMade class /// Revision : /// </summary> public FinalPaymentMade(IAPIHelper apiHelper, IGenericMethods genericMethods, AlertJSONGenerator.IFinalPaymentMadeGenerator finalPaymentMadeGenerator, IResourceManagerFactory resourceManager, ILogger logger) { this.apiHelper = apiHelper; this.genericMethods = genericMethods; this.finalPaymentMadeGenerator = finalPaymentMadeGenerator; this.resourceManager = resourceManager; this.logger = logger; }
//Constructor /// <summary> /// Constructor Name : AlertAPIServices /// Author : Pratik Soni /// Creation Date : 14 Feb 2018 /// Purpose : To create instant of APIHelper class /// Revision : /// </summary> public PreMoveConfirmationNotifications(IAPIHelper apiHelper, IGenericMethods genericMethods, AlertJSONGenerator.IPreMoveConfirmationNotificationGenerator preMoveConfirmationNotification, IResourceManagerFactory resourceManager, ILogger logger) { this.apiHelper = apiHelper; this.genericMethods = genericMethods; this.preMoveConfirmationNotification = preMoveConfirmationNotification; this.resourceManager = resourceManager; this.logger = logger; }
public void GenericSimpleTest1() { GenericMethods genericMethods = new GenericMethods(); BeethovenFactory beethovenFactory = new BeethovenFactory(); IGenericMethods instance = beethovenFactory.Generate <IGenericMethods>(genericMethods); List <string> calledMethods = new List <string>(); genericMethods.MethodCalled += s => calledMethods.Add(s); Assert.AreEqual(5, instance.Simple <int>()); Assert.AreEqual(0, instance.Simple <short>()); Assert.AreEqual("abcd", instance.Simple <string>()); CollectionAssert.AreEquivalent(new[] { "Simple", "Simple", "Simple" }, calledMethods); }
public static int TestIntFactory0(IGenericMethods i) { return i.Factory0<int>(); }
private Task <IEnumerable <T> > GetEnumerableAsync <T>(IGenericMethods self) where T : struct { return(self.GetEnumerableAsync <T>()); }
public static string TestRefParamString(IGenericMethods i, string inValue) { i.RefParam <string>(ref inValue); return(inValue); }
public static int TestRefParamInt(IGenericMethods i, int inValue) { i.RefParam <int>(ref inValue); return(inValue); }
private Task <IQueryable <T> > GetQueryAsync <T>(IGenericMethods self) where T : class, IDisposable, new() { return(self.GetQueryAsync <T>()); }
public static string TestRefParamString(IGenericMethods i, string inValue) { i.RefParam<string>(ref inValue); return inValue; }
public static string TestOutParamString(IGenericMethods i) { string value; i.OutParam<string>(out value); return value; }
public static string TestStringFactory1(IGenericMethods i, string test) { return i.Factory1<string>(test); }
public static string TestStringFactory0(IGenericMethods i) { return i.Factory0<string>(); }
public ListWithExtras(IGenericMethods genericMethods) { this.genericMethods = genericMethods; }
public static int TestIntFactory1(IGenericMethods i, int test) { return i.Factory1<int>(test); }
public static int TestIntFactory0(IGenericMethods i) { return(i.Factory0 <int>()); }
public static int TestOutParamInt(IGenericMethods i) { int value; i.OutParam<int>(out value); return value; }
public static string TestStringFactory0(IGenericMethods i) { return(i.Factory0 <string>()); }
public static int TestRefParamInt(IGenericMethods i, int inValue) { i.RefParam<int>(ref inValue); return inValue; }
public static int TestIntFactory1(IGenericMethods i, int test) { return(i.Factory1 <int>(test)); }
public static object[] GoWild(IGenericMethods i, bool first, string second, IList<int> value) { double obj; IEnumerable<string> actualSecond = Yielder(second); int len = i.Wild<string, double, int>(first, ref actualSecond, out obj, value); object[] result = new object[len]; result[0] = (object)obj; return result; }
public static string TestStringFactory1(IGenericMethods i, string test) { return(i.Factory1 <string>(test)); }