本文整理汇总了C#中Optional.ToList方法的典型用法代码示例。如果您正苦于以下问题:C# Optional.ToList方法的具体用法?C# Optional.ToList怎么用?C# Optional.ToList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Optional
的用法示例。
在下文中一共展示了Optional.ToList方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TableForeignKeyConstraint
public TableForeignKeyConstraint(ConstraintName constraintName, Sequence<ColumnName> columnNames, Qualified<SchemaName, TableName> refTableName, Optional<Sequence<ColumnName>> refColumnNames, Sequence<ForeignKeyAction> keyActions): base(constraintName) {
Debug.Assert(refTableName != null);
this.columnNames = columnNames.ToList();
this.refTableName = refTableName;
this.refColumnNames = refColumnNames.ToList();
this.keyActions = keyActions.ToList();
}
示例2: CommonTableExpression
public CommonTableExpression(AliasName aliasName, Optional<Sequence<ColumnName>> columnNames, SelectQuery selectQuery) {
Debug.Assert(aliasName != null);
Debug.Assert(selectQuery != null);
this.aliasName = aliasName;
this.columnNames = columnNames.ToList();
this.selectQuery = selectQuery;
}
示例3: SelectFromQuery
private SelectFromQuery(bool? restriction, TopExpression top, Sequence<ColumnItem> columnItems, Optional<DestinationRowset> intoClause, FromClause fromClause, Optional<Predicate> whereClause, Optional<Sequence<Expression>> groupByClause, Optional<Predicate> havingClause,
Optional<Sequence<OrderExpression>> orderList, ForClause forClause, RowsetCombineClause unionClause): base(restriction, top, columnItems, intoClause, whereClause, forClause, unionClause) {
this.fromClause = fromClause;
this.groupByClause = groupByClause.ToList();
this.havingClause = havingClause;
this.orderList = orderList.ToList();
}
示例4: CreateViewStatement
public CreateViewStatement(Qualified<SchemaName, ViewName> viewName, Optional<Sequence<ColumnName>> columnNames, OptionToken viewOption, SelectStatement selectStatement, Optional<WithCheckOptionToken> withCheckOption) {
Debug.Assert(viewName != null);
Debug.Assert(selectStatement != null);
this.viewName = viewName;
this.viewOption = viewOption;
this.columnNames = columnNames.ToList();
this.selectStatement = selectStatement;
this.withCheckOption = withCheckOption.HasValue();
}
示例5: CreateProcedureStatement
public CreateProcedureStatement(Qualified<SchemaName, ProcedureName> procedureName, Optional<Sequence<ProcedureParameter>> parameters, OptionToken option, ReplicationToken replication, StatementBlock body) {
Debug.Assert(procedureName != null);
Debug.Assert(body != null);
this.procedureName = procedureName;
this.option = option;
this.replication = replication;
this.parameters = parameters.ToList();
this.body = body;
}
示例6: CreateFulltextIndexStatement
public CreateFulltextIndexStatement(Qualified<SchemaName, TableName> tableName, Optional<Sequence<FulltextColumn>> columns, IndexName indexName, FulltextChangeTracking changeTracking) {
Debug.Assert(tableName != null);
Debug.Assert(indexName != null);
Debug.Assert(changeTracking != null);
this.tableName = tableName;
this.columns = columns.ToList();
this.indexName = indexName;
this.changeTracking = changeTracking;
}
示例7: ExecuteStatement
public ExecuteStatement(VariableName resultVariableName, Qualified<SchemaName, ProcedureName> procedureName, Optional<Sequence<ExecuteParameter>> parameters, OptionToken option) {
Debug.Assert(procedureName != null);
this.resultVariableName = resultVariableName;
this.procedureName = procedureName;
this.parameters = parameters.ToList();
this.option = option;
if (!procedureName.IsQualified && procedureName.Name.Value.StartsWith("sp_", StringComparison.OrdinalIgnoreCase)) {
procedureName.LockOverride();
int[] parameterPositions;
if (objectNameParameters.TryGetValue(procedureName.Name.Value, out parameterPositions)) {
foreach (int parameterPosition in parameterPositions.Where(p => this.parameters.Count > p)) {
ExecuteParameter<Literal> objectNameParameter = (ExecuteParameter<Literal>)this.parameters[parameterPosition];
if ((objectNameParameter != null) && (objectNameParameter.Value is StringLiteral)) {
this.parameters[parameterPosition] = new ExecuteParameterObjectName(objectNameParameter.ParameterName, ((StringLiteral)objectNameParameter.Value), objectNameParameter.Output);
}
}
}
}
}
示例8: OutputClause
public OutputClause(Sequence<ColumnItem> columnItems, DestinationRowset destinationName, Optional<Sequence<ColumnName>> destinationColumnNames) {
this.destinationName = destinationName;
this.destinationColumnNames = destinationColumnNames.ToList();
this.columnItems = columnItems.ToList();
}
示例9: MergeOperationInsert
public MergeOperationInsert(Optional<Sequence<ColumnName>> columnNames, Sequence<Expression> expressions) {
this.columnNames = columnNames.ToList();
this.expressions = expressions.ToList();
}
示例10: InsertValuesStatement
protected InsertValuesStatement(QueryOptions queryOptions, TopExpression topExpression, DestinationRowset destinationRowset, Optional<Sequence<ColumnName>> columnNames, OutputClause output, QueryHint queryHint): base(queryOptions, topExpression, destinationRowset, queryHint) {
Debug.Assert(output != null);
this.columnNames = columnNames.ToList();
this.output = output;
}