本文整理汇总了C#中Optional.HasValue方法的典型用法代码示例。如果您正苦于以下问题:C# Optional.HasValue方法的具体用法?C# Optional.HasValue怎么用?C# Optional.HasValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Optional
的用法示例。
在下文中一共展示了Optional.HasValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parameter
public Parameter(ParameterName parameterName, Qualified<SchemaName, TypeName> parameterTypeName, Optional<Literal> defaultValue, Optional<UnreservedKeyword> readOnly) {
Debug.Assert(parameterName != null);
Debug.Assert(parameterTypeName != null);
this.parameterName = parameterName;
this.parameterTypeName = parameterTypeName;
this.defaultValue = defaultValue;
this.readOnly = readOnly.HasValue();
}
示例2: CreateColumnIndexStatement
public CreateColumnIndexStatement(Optional<UniqueToken> unique, ConstraintClusterToken clustered, IndexName indexName, Qualified<SchemaName, TableName> tableName, Sequence<IndexColumn> indexColumns, Sequence<ColumnName> columnNames, Predicate filter, IndexOptionGroup indexOptions)
: base(indexName, tableName, indexOptions) {
Debug.Assert(clustered != null);
this.unique = unique.HasValue();
this.clustered = clustered.Clustered;
this.indexColumns = indexColumns.ToList();
this.filter = filter;
includeColumnNames = columnNames.ToList();
}
示例3: 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();
}
示例4: TopExpression
public TopExpression(Expression expression, Optional<PercentToken> percent, OptionToken option) {
this.expression = expression;
this.percent = percent.HasValue();
withTies = option is OptionTiesToken;
}
示例5: ProcedureParameter
public ProcedureParameter(ParameterName parameterName, Qualified<SchemaName, TypeName> parameterTypeName, Optional<VaryingToken> varying, Optional<Literal> defaultValue, Optional<UnreservedKeyword> output, Optional<UnreservedKeyword> readOnly)
: base(parameterName, parameterTypeName, defaultValue, readOnly) {
this.varying = varying.HasValue();
this.output = output.HasValue();
}