public Binance(Maybe <IDownloadData> downloader) { // If a downloader is not provided, create the default if (!downloader.Any()) { downloader = new Maybe <IDownloadData>( new DownloadData(Constants.Endpoint, Constants.AbsolutePath) ); } // We can call Single() safely because we are sure there is only one // instance of IDownloadData inside the Maybe _publicApi = new PublicMethods(downloader.Single()); _privateApi = new PrivateMethods(); }
public static void Main() { PublicMethods.Test(); ProtectedMethods.Test(); PrivateMethods.Test(); Expression.Call(typeof(Derived), "PublicOnBase", Type.EmptyTypes); Expression.Call(typeof(Derived), "ProtectedOnBase", Type.EmptyTypes); Expression.Call(typeof(Derived), "PrivateOnBase", Type.EmptyTypes); // Keep all methods on type UnknownNameMethodClass Expression.Call(typeof(UnknownNameMethodClass), GetUnknownString(), Type.EmptyTypes); TestUnknownType.Test(); TestGenericMethods.Test(); }