/// <summary> /// Initializes a new instance of the <see cref="SqlHelper<P>"/> class. /// </summary> /// <param name="connectionString">The connection string, cannot be <c>null</c>.</param> /// <param name="utility">The utility, a default utility will be used if <c>null</c>.</param> public SqlHelper(string connectionString, IUtilitySet utility) { // Check arguments if (connectionString == null) { throw new ArgumentNullException("connectionString"); } if (utility == null) { utility = new DefaultUtility <SqlHelper <P> >(this); } // Initialize member fields m_ConnectionString = connectionString; m_Utility = utility; #if DEBUG && DebugDataLayer // Log creation Trace.TraceInformation(GetType().Name + " created."); #endif }
public bool TryDefault(Type type, out IComponent component) { component = DefaultUtility.Default(type) as IComponent; return(component != null); }
internal ExpressionCallContext() { Utility = new DefaultUtility { _context = this }; }
public T Default <T>() where T : struct, IComponent => DefaultUtility.Default <T>();