public OYSTimeSpan(IYear Y, IMonth M, IWeek W, IDay D, IHour h, IMinute m, ISecond s) { this.Years = Y; this.Months = M; this.Days = D; this.Hours = h; this.Minutes = m; this.Seconds = s; }
public OYSDateTime(IYear YYYY, IMonth MM, IDay DD, IHour hh, IMinute mm, ISecond ss) { this.Year = YYYY; this.Month = MM; this.Day = DD; this.Hour = hh; this.Minute = mm; this.Second = ss; }
public OYSDateTime(DateTime datetime) { Year = new Year(datetime.Year); Month = new Month(datetime.Month); Day = new Day(datetime.Day); Hour = new Hour(datetime.Hour); Minute = new Minute(datetime.Minute); Second = new Second(datetime.Second); }
public OYSTime(string date) { OYSTime conversion; TryParse(date, out conversion); this.Hour = conversion.Hour; this.Minute = conversion.Minute; this.Second = conversion.Second; }
public OYSTimeSpan(TimeSpan timespan) { Years = new Year((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Year - (new DateTime(2018, 01, 01, 0, 0, 0).Year)); Months = new Month((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Month - (new DateTime(2018, 01, 01, 0, 0, 0).Month)); Weeks = 0.Weeks(); Days = new Day((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Day - (new DateTime(2018, 01, 01, 0, 0, 0).Day)); Hours = new Hour((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Hour - (new DateTime(2018, 01, 01, 0, 0, 0).Hour)); Minutes = new Minute((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Minute - (new DateTime(2018, 01, 01, 0, 0, 0).Minute)); Seconds = new Second((new DateTime(2018, 01, 01, 0, 0, 0) + timespan).Second - (new DateTime(2018, 01, 01, 0, 0, 0).Second)); }
public string GetTime(int iType) { if (iType == 1) { return(IHour.ToString() + ":" + IMinute.ToString() + ":" + ISecond.ToString()); } else { return(IHour.ToString() + ":" + IMinute.ToString()); } }
public OYSTimeSpan(string date) { OYSTimeSpan conversion; TryParse(date, out conversion); this.Years = conversion.Years; this.Months = conversion.Months; this.Days = conversion.Days; this.Hours = conversion.Hours; this.Minutes = conversion.Minutes; this.Seconds = conversion.Seconds; }
public OYSDateTime(string date) { OYSDateTime conversion; TryParse(date, out conversion); this.Year = conversion.Year; this.Month = conversion.Month; this.Day = conversion.Day; this.Hour = conversion.Hour; this.Minute = conversion.Minute; this.Second = conversion.Second; }
public void MixinImplementingMoreThanOneInterface() { ProxyGenerationOptions proxyGenerationOptions = new ProxyGenerationOptions(); ComplexMixin mixin_instance = new ComplexMixin(); proxyGenerationOptions.AddMixinInstance(mixin_instance); AssertInvocationInterceptor interceptor = new AssertInvocationInterceptor(); object proxy = generator.CreateClassProxy( typeof(SimpleClass), proxyGenerationOptions, interceptor ); Assert.IsNotNull(proxy); Assert.IsTrue(typeof(SimpleClass).IsAssignableFrom(proxy.GetType())); Assert.IsFalse(interceptor.Invoked); IThird inter3 = proxy as IThird; Assert.IsNotNull(inter3); inter3.DoThird(); Assert.IsTrue(interceptor.Invoked); Assert.AreSame(proxy, interceptor.proxy); Assert.AreSame(mixin_instance, interceptor.mixin); ISecond inter2 = proxy as ISecond; Assert.IsNotNull(inter2); inter2.DoSecond(); Assert.IsTrue(interceptor.Invoked); Assert.AreSame(proxy, interceptor.proxy); Assert.AreSame(mixin_instance, interceptor.mixin); IFirst inter1 = proxy as IFirst; Assert.IsNotNull(inter1); inter1.DoFirst(); Assert.IsTrue(interceptor.Invoked); Assert.AreSame(proxy, interceptor.proxy); Assert.AreSame(mixin_instance, interceptor.mixin); }
public OverloadedTestClass(IFirst first, ISecond second, IThird third) { _first = first; _second = second; _third = third; }
public static ITimeSpan ToTimeSpan(this ISecond input) => ObjectFactory.CreateTimeSpan(new System.TimeSpan(0, 0, 0, (int)input.RawValue));
public TestClassWithPropertiesAndConstructor(ISecond second) { Second = second; }
public C(ISecond someProperty) : base(someProperty) { //Works now }
public static IDateTime ToDateTime(this ISecond input) => ObjectFactory.CreateDateTime(new System.DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, (int)input.RawValue));
public ObjectA(ISecond child) { this.Child = child; }
public OverloadedTestClass(IFirst first, ISecond second) : this(first, second, null) { }
private App(IFirst first, ISecond second) { this.first = first; this.second = second; }
public OYSTime(DateTime datetime) { Hour = new Hour(datetime.Hour); Minute = new Minute(datetime.Minute); Second = new Second(datetime.Second); }
public OYSTime(IHour hh, IMinute mm, ISecond ss) { this.Hour = hh; this.Minute = mm; this.Second = ss; }
public RequiresSecondInConstructor(ISecond second) { Second = second; }