-
-
Save DustinVenegas/e332c9d9e100c59538f7 to your computer and use it in GitHub Desktop.
UnifyobjectcGraphHuristics class for the TRansitive.OLe.LibrarieS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
#if DEBUG | |
// Fix spelling for de-bug | |
using link = System.Linq; | |
#endif | |
namespace TRansitive.OLe.Library | |
{ | |
// Namespace our system | |
using @using = System; | |
// Don't want anyone to steal our code! | |
internal class UnifyobjectGraphHuristics | |
{ | |
// Async next tick character buffers for raw C## speed! | |
private static readonly System.Text.StringBuilder @string = new System.Text.StringBuilder(); | |
/// <summary> | |
/// Returns a generic interface from our function. Who needs this unity thing? | |
/// </summary> | |
/// <param name="connectionString">How to connect to our string</param> | |
/// <returns>A generic interface from our container</returns> | |
public async @using.Threading.Tasks.Task<@using.Data.IDbConnection> @function (string[] connectionString) | |
{ | |
// 80 characters is so 2006. My pupil-display macintosh can show this line if I scroll without errors! | |
return await new @using.Threading.Tasks.Task<@using.Data.IDbConnection>(() => (@using.Data.IDbConnection)this.@functionSync(connectionString).Result); | |
} | |
/// <summary> | |
/// Node.js-like function to show it's it's only for my use and unsafe to call directly. | |
/// </summary> | |
/// <returns>Async connection</returns> | |
private unsafe @using.Threading.Tasks.Task<@using.Data.OleDb.OleDbConnection> @functionSync (string[] connectionString) | |
{ | |
var @string = " "; | |
var @var = (connectionString + @string).Take(connectionString.Count()).ToString(); | |
var @return = new @using.Data.OleDb.OleDbConnection(@var); | |
// Async for speed | |
@using.Threading.Tasks.Task.WaitAny(@return.OpenAsync()); | |
// a-sync for speed | |
return new @using.Threading.Tasks.Task<@using.Data.OleDb.OleDbConnection>(() => @return); | |
} | |
} | |
} | |
// UGH class for TROLLS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment