当前位置: 首页>>代码示例>>C#>>正文


C# ColumnValue类代码示例

本文整理汇总了C#中ColumnValue的典型用法代码示例。如果您正苦于以下问题:C# ColumnValue类的具体用法?C# ColumnValue怎么用?C# ColumnValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ColumnValue类属于命名空间,在下文中一共展示了ColumnValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public override CommandResultCode Execute(IExecutionContext context, CommandArguments args)
        {
            ISettingsHandler handler = Application as ISettingsHandler;
            if (handler == null) {
                Error.WriteLine("The application doesn't support settings.");
                return CommandResultCode.ExecutionFailed;
            }

            if (args.MoveNext())
                return CommandResultCode.SyntaxError;

            VarColumns[0].ResetWidth();
            VarColumns[1].ResetWidth();

            TableRenderer table = new TableRenderer(VarColumns, Out);
            table.EnableHeader = true;
            table.EnableFooter = true;
            foreach(KeyValuePair<string, string> setting in handler.Settings) {
                if (setting.Key == ApplicationSettings.SpecialLastCommand)
                    continue;

                ColumnValue[] row = new ColumnValue[4];
                row[0] = new ColumnValue(setting.Key);
                row[1] = new ColumnValue(setting.Value);
                table.AddRow(row);
            }

            table.CloseTable();
            Error.WriteLine();

            return CommandResultCode.Success;
        }
开发者ID:deveel,项目名称:dshell,代码行数:32,代码来源:VariablesCommand.cs

示例2: Execute

        public override CommandResultCode Execute(IExecutionContext context, CommandArguments args)
        {
            PropertyRegistry properties = Properties;
            if (properties == null) {
                Application.Error.WriteLine("the current context does not support properties.");
                return CommandResultCode.ExecutionFailed;
            }

            if (args.MoveNext()) {
                string name = args.Current;
                PropertyHolder holder = properties.GetProperty(name);
                if (holder == null)
                    return CommandResultCode.ExecutionFailed;

                PrintDescription(name, holder, Application.Error);
                return CommandResultCode.Success;
            }

            ProperiesColumns[0].ResetWidth();
            ProperiesColumns[1].ResetWidth();
            TableRenderer table = new TableRenderer(ProperiesColumns, Application.Out);
            foreach(KeyValuePair<string, PropertyHolder> entry in properties) {
                ColumnValue[] row = new ColumnValue[3];
                PropertyHolder holder = entry.Value;
                row[0] = new ColumnValue(entry.Key);
                row[1] = new ColumnValue(holder.Value);
                row[2] = new ColumnValue(holder.ShortDescription);
                table.AddRow(row);
            }
            table.CloseTable();
            return CommandResultCode.Success;
        }
开发者ID:deveel,项目名称:dshell,代码行数:32,代码来源:ShowPropertyCommand.cs

示例3: SetColumns

        /// <summary>
        /// Recursive SetColumns method for data pinning. This populates the buffer and
        /// calls the inherited SetColumns method.
        /// </summary>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">
        /// The table to set the columns in. An update should be prepared.
        /// </param>
        /// <param name="columnValues">
        /// Column values to set.
        /// </param>
        /// <param name="nativeColumns">
        /// Structures to put the pinned data in.
        /// </param>
        /// <param name="i">Offset of this object in the array.</param>
        /// <returns>An error code.</returns>
        internal override unsafe int SetColumns(JET_SESID sesid, JET_TABLEID tableid, ColumnValue[] columnValues, NATIVE_SETCOLUMN* nativeColumns, int i)
        {
            if (null != this.Value)
            {
                fixed (void* buffer = this.Value)
                {
                    return this.SetColumns(
                        sesid, tableid, columnValues, nativeColumns, i, buffer, checked(this.Value.Length * sizeof(char)), true);
                }
            }

            return this.SetColumns(sesid, tableid, columnValues, nativeColumns, i, null, 0, false);
        }
开发者ID:Rationalle,项目名称:ravendb,代码行数:29,代码来源:StringColumnValue.cs

示例4: Execute

 public override CommandResultCode Execute(IExecutionContext context, CommandArguments args)
 {
     Columns[0].ResetWidth();
     Columns[1].ResetWidth();
     TableRenderer table = new TableRenderer(Columns, Out);
     foreach(KeyValuePair<string, string> alias in Application.Commands.Aliases) {
         ColumnValue[] row = new ColumnValue[2];
         row[0] = new ColumnValue(alias.Key);
         row[1] = new ColumnValue(alias.Value);
         table.AddRow(row);
     }
     table.CloseTable();
     return CommandResultCode.Success;
 }
开发者ID:deveel,项目名称:dshell,代码行数:14,代码来源:AliasesCommand.cs

示例5: Add

 public void Add(GeneralItem generalItem)
 {
     try {
         ColumnValue id = new ColumnValue () { Item1 = "id", Item2 = generalItem.Id.ToString() };
         ColumnValue name = new ColumnValue () { Item1 = "name", Item2 = generalItem.Name };
         ColumnValue iconId = new ColumnValue () { Item1 = "iconId", Item2 = generalItem.IconId.ToString() };
         List<ColumnValue> columns = new List<ColumnValue> ();
         columns.Add (id);
         columns.Add (name);
         columns.Add (iconId);
         this.Insert (columns);
     } catch (MySqlException ex) {
         switch (ex.Number) {
         case 0:
             throw new DatabaseException ("Cannot connect to server.  Contact administrator", ex);
         case 1045:
             throw new DatabaseException ("Invalid username/password, please try again", ex);
         default:
             throw new DatabaseException (ex.Message, ex);
         }
     }
 }
开发者ID:RicardoEPRodrigues,项目名称:LetsParty,代码行数:22,代码来源:GeneralItemsTable.cs

示例6: SetStatusFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's Scope_.Status field.
 /// </summary>
 public void SetStatusFieldValue(ColumnValue val)
 {
     this.SetValue(val, TableUtils.StatusColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:7,代码来源:BaseScopeRecord.cs

示例7: SetSiteZipFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's VwSite_.SiteZip field.
 /// </summary>
 public void SetSiteZipFieldValue(string val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.SiteZipColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseVwSiteRecord.cs

示例8: SetCreatedByFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's Scope_.CreatedBy field.
 /// </summary>
 public void SetCreatedByFieldValue(string val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.CreatedByColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseScopeRecord.cs

示例9: SetTotalFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's VwPropSBondBudgetDetail_.Total field.
 /// </summary>
 public void SetTotalFieldValue(long val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.TotalColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseVwPropSBondBudgetDetailRecord.cs

示例10: Setsub_categoryFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's VwPropSBondBudgetDetail_.sub_category field.
 /// </summary>
 public void Setsub_categoryFieldValue(string val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.sub_categoryColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseVwPropSBondBudgetDetailRecord.cs

示例11: SetParentIDFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's VwPropSBondBudgetDetail_.ParentID field.
 /// </summary>
 public void SetParentIDFieldValue(long val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.ParentIDColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseVwPropSBondBudgetDetailRecord.cs

示例12: SetID0FieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's VwPropSBondBudgetDetail_.ID field.
 /// </summary>
 public void SetID0FieldValue(long val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.ID0Column);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseVwPropSBondBudgetDetailRecord.cs

示例13: SetScopeDescriptionFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's Scope_.ScopeDescription field.
 /// </summary>
 public void SetScopeDescriptionFieldValue(ColumnValue val)
 {
     this.SetValue(val, TableUtils.ScopeDescriptionColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:7,代码来源:BaseScopeRecord.cs

示例14: SetLastEditDateFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's Scope_.LastEditDate field.
 /// </summary>
 public void SetLastEditDateFieldValue(DateTime val)
 {
     ColumnValue cv = new ColumnValue(val);
     this.SetValue(cv, TableUtils.LastEditDateColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseScopeRecord.cs

示例15: SetLastEditByIDFieldValue

 /// <summary>
 /// This is a convenience method that allows direct modification of the value of the record's Scope_.LastEditByID field.
 /// </summary>
 public void SetLastEditByIDFieldValue(System.Guid val)
 {
     ColumnValue cv = new ColumnValue(val, System.TypeCode.Object);
     this.SetValue(cv, TableUtils.LastEditByIDColumn);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseScopeRecord.cs


注:本文中的ColumnValue类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。