コード例 #1
0
ファイル: DBField.cs プロジェクト: sampath1983jan/TechData
        /// <summary>
        /// Creates a new DBField reference with the specified owner.table.field name - do not enclose in delimiters
        /// </summary>
        /// <param name="table">The table (or table alias) this field belongs to</param>
        /// <param name="field">The name of the field</param>
        /// <param name="owner">The schema owner</param>
        /// <param name="catalog">The catalog / database of the field</param>
        /// <returns></returns>
        public static DBField Field(string catalog, string owner, string table, string field)
        {
            DBFieldRef fref = new DBFieldRef();

            fref.Name    = field;
            fref.Table   = table;
            fref.Owner   = owner;
            fref.Catalog = catalog;
            return(fref);
        }
コード例 #2
0
ファイル: DBField.cs プロジェクト: sampath1983jan/TechData
        /// <summary>
        /// Creates a new DBField reference with the specified name - do not enclose in delimiters
        /// </summary>
        /// <param name="field"></param>
        /// <returns></returns>
        public static DBField Field(string field)
        {
            if (string.IsNullOrEmpty(field))
            {
                throw new ArgumentNullException("field");
            }
            DBFieldRef fref = new DBFieldRef();

            fref.Name = field;

            return(fref);
        }
コード例 #3
0
ファイル: DBField.cs プロジェクト: sampath1983jan/TechData
        /// <summary>
        /// Creates a new DBField reference with the specified table.field name - do not enclose in delimiters
        /// </summary>
        /// <param name="table">The table (or table alias) this field belongs to</param>
        /// <param name="field">The name of the field</param>
        /// <returns></returns>
        public static DBField Field(string table, string field)
        {
            if (string.IsNullOrEmpty(field))
            {
                throw new ArgumentNullException("field");
            }
            //we can get away with table being empty or null.

            DBFieldRef fref = new DBFieldRef();

            fref.Name  = field;
            fref.Table = table;

            return(fref);
        }
コード例 #4
0
ファイル: DBField.cs プロジェクト: sampath1983jan/TechData
        //
        // static factory methods
        //

        #region public static DBField Field()
        /// <summary>
        /// Creates a new empty DBField reference
        /// </summary>
        /// <returns></returns>
        public static DBField Field()
        {
            DBFieldRef fref = new DBFieldRef();

            return(fref);
        }