本文整理汇总了C#中SqlCompareOptions类的典型用法代码示例。如果您正苦于以下问题:C# SqlCompareOptions类的具体用法?C# SqlCompareOptions怎么用?C# SqlCompareOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqlCompareOptions类属于命名空间,在下文中一共展示了SqlCompareOptions类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SmiExtendedMetaData
internal SmiExtendedMetaData(SqlDbType dbType, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, Type userDefinedType, string udtAssemblyQualifiedName, bool isMultiValued, IList<SmiExtendedMetaData> fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, string name, string typeSpecificNamePart1, string typeSpecificNamePart2, string typeSpecificNamePart3) : base(dbType, maxLength, precision, scale, localeId, compareOptions, userDefinedType, udtAssemblyQualifiedName, isMultiValued, fieldMetaData, extendedProperties)
{
this._name = name;
this._typeSpecificNamePart1 = typeSpecificNamePart1;
this._typeSpecificNamePart2 = typeSpecificNamePart2;
this._typeSpecificNamePart3 = typeSpecificNamePart3;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SmiExtendedMetaData.cs
示例2: SmiQueryMetaData
internal SmiQueryMetaData(SqlDbType dbType, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, Type userDefinedType, string udtAssemblyQualifiedName, bool isMultiValued, IList<SmiExtendedMetaData> fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, string name, string typeSpecificNamePart1, string typeSpecificNamePart2, string typeSpecificNamePart3, bool allowsDBNull, string serverName, string catalogName, string schemaName, string tableName, string columnName, SqlBoolean isKey, bool isIdentity, bool isColumnSet, bool isReadOnly, SqlBoolean isExpression, SqlBoolean isAliased, SqlBoolean isHidden) : base(dbType, maxLength, precision, scale, localeId, compareOptions, userDefinedType, udtAssemblyQualifiedName, isMultiValued, fieldMetaData, extendedProperties, name, typeSpecificNamePart1, typeSpecificNamePart2, typeSpecificNamePart3, allowsDBNull, serverName, catalogName, schemaName, tableName, columnName, isKey, isIdentity, isColumnSet)
{
this._isReadOnly = isReadOnly;
this._isExpression = isExpression;
this._isAliased = isAliased;
this._isHidden = isHidden;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SmiQueryMetaData.cs
示例3: SmiStorageMetaData
internal SmiStorageMetaData(SqlDbType dbType, long maxLength, byte precision, byte scale, long localeId, SqlCompareOptions compareOptions, Type userDefinedType, string udtAssemblyQualifiedName, bool isMultiValued, IList<SmiExtendedMetaData> fieldMetaData, SmiMetaDataPropertyCollection extendedProperties, string name, string typeSpecificNamePart1, string typeSpecificNamePart2, string typeSpecificNamePart3, bool allowsDBNull, string serverName, string catalogName, string schemaName, string tableName, string columnName, SqlBoolean isKey, bool isIdentity, bool isColumnSet) : base(dbType, maxLength, precision, scale, localeId, compareOptions, userDefinedType, udtAssemblyQualifiedName, isMultiValued, fieldMetaData, extendedProperties, name, typeSpecificNamePart1, typeSpecificNamePart2, typeSpecificNamePart3)
{
this._allowsDBNull = allowsDBNull;
this._serverName = serverName;
this._catalogName = catalogName;
this._schemaName = schemaName;
this._tableName = tableName;
this._columnName = columnName;
this._isKey = isKey;
this._isIdentity = isIdentity;
this._isColumnSet = isColumnSet;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:SmiStorageMetaData.cs
示例4: SqlMetaData
// Private constructor used to initialize default instance array elements.
// DO NOT EXPOSE OUTSIDE THIS CLASS! It performs no validation.
private SqlMetaData(String name,
SqlDbType sqlDbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
bool partialLength)
{
AssertNameIsValid(name);
_strName = name;
_sqlDbType = sqlDbType;
_lMaxLength = maxLength;
_bPrecision = precision;
_bScale = scale;
_lLocale = localeId;
_eCompareOptions = compareOptions;
_bPartialLength = partialLength;
ThrowIfUdt(sqlDbType);
}
开发者ID:eerhardt,项目名称:corefx,代码行数:23,代码来源:SqlMetaData.cs
示例5: SqlMetaData
// Most general constructor, should be able to intialize all SqlMetaData fields.(Used by SqlParameter)
internal SqlMetaData (String name,
SqlDbType sqlDBType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
string xmlSchemaCollectionDatabase,
string xmlSchemaCollectionOwningSchema,
string xmlSchemaCollectionName,
bool partialLength,
Type udtType) {
AssertNameIsValid(name);
m_strName = name;
m_sqlDbType = sqlDBType;
m_lMaxLength = maxLength;
m_bPrecision = precision;
m_bScale = scale;
m_lLocale = localeId;
m_eCompareOptions = compareOptions;
m_XmlSchemaCollectionDatabase = xmlSchemaCollectionDatabase;
m_XmlSchemaCollectionOwningSchema = xmlSchemaCollectionOwningSchema;
m_XmlSchemaCollectionName = xmlSchemaCollectionName;
m_bPartialLength = partialLength;
m_udttype = udtType;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:29,代码来源:SqlMetaData.cs
示例6: CreateSortedSqlStringList
private static SortedList<SqlString, SqlString> CreateSortedSqlStringList(int numberOfItems, SqlCompareOptions compareOption, CultureInfo cInfo, int localeID)
{
SortedList<SqlString, SqlString> items = new SortedList<SqlString, SqlString>(numberOfItems);
//
// Generate list of SqlString
//
Random rand = new Random(500);
int numberOfWords;
StringBuilder builder = new StringBuilder();
SqlString word;
for (int i = 0; i < numberOfItems; ++i)
{
do
{
builder.Clear();
numberOfWords = rand.Next(10) + 1;
for (int j = 0; j < numberOfWords; ++j)
{
builder.Append(s_sampleString[rand.Next(s_sampleStringCount)]);
builder.Append(" ");
}
if (numberOfWords % 2 == 1)
{
for (int k = 0; k < rand.Next(100); ++k)
{
builder.Append(' ');
}
}
word = new SqlString(builder.ToString(), localeID, compareOption);
} while (items.ContainsKey(word));
items.Add(word, word);
}
return items;
}
开发者ID:shiftkey-tester,项目名称:corefx,代码行数:42,代码来源:SqlTypeTest.cs
示例7: SmiMetaData
internal SmiMetaData(
SqlDbType dbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
Type userDefinedType,
SmiMetaData[] columns) :
// Implement as calling the new ctor
this(
dbType,
maxLength,
precision,
scale,
localeId,
compareOptions,
userDefinedType ) {
Debug.Assert( null == columns, "Row types not supported" );
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:20,代码来源:SmiMetaData.cs
示例8: SmiQueryMetaData
internal SmiQueryMetaData( SqlDbType dbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
Type userDefinedType,
string name,
string typeSpecificNamePart1,
string typeSpecificNamePart2,
string typeSpecificNamePart3,
bool allowsDBNull,
string serverName,
string catalogName,
string schemaName,
string tableName,
string columnName,
SqlBoolean isKey,
bool isIdentity,
bool isReadOnly,
SqlBoolean isExpression,
SqlBoolean isAliased,
SqlBoolean isHidden ) :
this( dbType,
maxLength,
precision,
scale,
localeId,
compareOptions,
userDefinedType,
false,
null,
null,
name,
typeSpecificNamePart1,
typeSpecificNamePart2,
typeSpecificNamePart3,
allowsDBNull,
serverName,
catalogName,
schemaName,
tableName,
columnName,
isKey,
isIdentity,
isReadOnly,
isExpression,
isAliased,
isHidden) {
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:50,代码来源:SmiMetaData.cs
示例9: SmiStorageMetaData
// SMI V200 ctor.
internal SmiStorageMetaData(
SqlDbType dbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
Type userDefinedType,
bool isMultiValued,
IList<SmiExtendedMetaData> fieldMetaData,
SmiMetaDataPropertyCollection extendedProperties,
string name,
string typeSpecificNamePart1,
string typeSpecificNamePart2,
string typeSpecificNamePart3,
bool allowsDBNull,
string serverName,
string catalogName,
string schemaName,
string tableName,
string columnName,
SqlBoolean isKey,
bool isIdentity) :
this( dbType,
maxLength,
precision,
scale,
localeId,
compareOptions,
userDefinedType,
null,
isMultiValued,
fieldMetaData,
extendedProperties,
name,
typeSpecificNamePart1,
typeSpecificNamePart2,
typeSpecificNamePart3,
allowsDBNull,
serverName,
catalogName,
schemaName,
tableName,
columnName,
isKey,
isIdentity,
false) {
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:49,代码来源:SmiMetaData.cs
示例10: SmiParameterMetaData
// SMI V220 ctor.
internal SmiParameterMetaData(
SqlDbType dbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
Type userDefinedType,
string udtAssemblyQualifiedName,
bool isMultiValued,
IList<SmiExtendedMetaData> fieldMetaData,
SmiMetaDataPropertyCollection extendedProperties,
string name,
string typeSpecificNamePart1,
string typeSpecificNamePart2,
string typeSpecificNamePart3,
ParameterDirection direction) :
base( dbType,
maxLength,
precision,
scale,
localeId,
compareOptions,
userDefinedType,
udtAssemblyQualifiedName,
isMultiValued,
fieldMetaData,
extendedProperties,
name,
typeSpecificNamePart1,
typeSpecificNamePart2,
typeSpecificNamePart3) {
Debug.Assert( ParameterDirection.Input == direction
|| ParameterDirection.Output == direction
|| ParameterDirection.InputOutput == direction
|| ParameterDirection.ReturnValue == direction, "Invalid direction: " + direction );
_direction = direction;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:39,代码来源:SmiMetaData.cs
示例11: SqlMetaData
public SqlMetaData (string name, SqlDbType type, long maxLength, long locale, SqlCompareOptions compareOptions)
{
this.compareOptions = compareOptions;
this.localeId = locale;
this.maxLength = maxLength;
this.name = name;
this.sqlDbType = type;
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:SqlMetaData.cs
示例12: SqlStringCompareTest
private static void SqlStringCompareTest(int numberOfItems, SqlCompareOptions compareOption, CultureInfo cInfo, int localeID)
{
SortedList<SqlString, SqlString> items = CreateSortedSqlStringList(numberOfItems, compareOption, cInfo, localeID);
VerifySortedSqlStringList(items, compareOption, cInfo);
}
开发者ID:shiftkey-tester,项目名称:corefx,代码行数:5,代码来源:SqlTypeTest.cs
示例13: VerifySortedSqlStringList
private static void VerifySortedSqlStringList(SortedList<SqlString, SqlString> items, SqlCompareOptions compareOption, CultureInfo cInfo)
{
//
// Verify the list is in order
//
IList<SqlString> keyList = items.Keys;
for (int i = 0; i < items.Count - 1; ++i)
{
SqlString currentString = keyList[i];
SqlString nextString = keyList[i + 1];
Assert.True((bool)((currentString < nextString) && (nextString >= currentString)), "FAILED: (SqlString Operator Comparison): SqlStrings are out of order");
Assert.True((currentString.CompareTo(nextString) < 0) && (nextString.CompareTo(currentString) > 0), "FAILED: (SqlString.CompareTo): SqlStrings are out of order");
switch (compareOption)
{
case SqlCompareOptions.BinarySort:
Assert.True(CompareBinary(currentString.Value, nextString.Value) < 0, "FAILED: (SqlString BinarySort Comparison): SqlStrings are out of order");
break;
case SqlCompareOptions.BinarySort2:
Assert.True(string.CompareOrdinal(currentString.Value.TrimEnd(), nextString.Value.TrimEnd()) < 0, "FAILED: (SqlString BinarySort2 Comparison): SqlStrings are out of order");
break;
default:
CompareInfo cmpInfo = cInfo.CompareInfo;
CompareOptions cmpOptions = SqlString.CompareOptionsFromSqlCompareOptions(nextString.SqlCompareOptions);
Assert.True(cmpInfo.Compare(currentString.Value.TrimEnd(), nextString.Value.TrimEnd(), cmpOptions) < 0, "FAILED: (SqlString Comparison): SqlStrings are out of order");
break;
}
}
}
开发者ID:shiftkey-tester,项目名称:corefx,代码行数:33,代码来源:SqlTypeTest.cs
示例14: SmiExtendedMetaData
internal SmiExtendedMetaData(
SqlDbType dbType,
long maxLength,
byte precision,
byte scale,
long localeId,
SqlCompareOptions compareOptions,
Type userDefinedType,
string name,
string typeSpecificNamePart1,
string typeSpecificNamePart2,
string typeSpecificNamePart3) :
this(
dbType,
maxLength,
precision,
scale,
localeId,
compareOptions,
userDefinedType,
false,
null,
null,
name,
typeSpecificNamePart1,
typeSpecificNamePart2,
typeSpecificNamePart3) {
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:28,代码来源:SmiMetaData.cs
示例15: Construct
// Construction for string types with specified locale/compare options
private void Construct(String name,
SqlDbType dbType,
long maxLength,
long locale,
SqlCompareOptions compareOptions,
bool useServerDefault,
bool isUniqueKey,
SortOrder columnSortOrder,
int sortOrdinal)
{
AssertNameIsValid(name);
ValidateSortOrder(columnSortOrder, sortOrdinal);
// Validate type and max length.
if (SqlDbType.Char == dbType)
{
if (maxLength > x_lServerMaxANSI || maxLength < 0)
throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
}
else if (SqlDbType.VarChar == dbType)
{
if ((maxLength > x_lServerMaxANSI || maxLength < 0) && maxLength != Max)
throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
}
else if (SqlDbType.NChar == dbType)
{
if (maxLength > x_lServerMaxUnicode || maxLength < 0)
throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
}
else if (SqlDbType.NVarChar == dbType)
{
if ((maxLength > x_lServerMaxUnicode || maxLength < 0) && maxLength != Max)
throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
}
else if (SqlDbType.NText == dbType || SqlDbType.Text == dbType)
{
// old-style lobs only allowed with Max length
if (SqlMetaData.Max != maxLength)
throw ADP.Argument(Res.GetString(Res.ADP_InvalidDataLength2, maxLength.ToString(CultureInfo.InvariantCulture)), "maxLength");
}
else
throw SQL.InvalidSqlDbTypeForConstructor(dbType);
// Validate locale?
// Validate compare options
// Binary sort must be by itself.
// Nothing else but the Ignore bits is allowed.
if (SqlCompareOptions.BinarySort != compareOptions &&
0 != (~((int)SqlCompareOptions.IgnoreCase | (int)SqlCompareOptions.IgnoreNonSpace |
(int)SqlCompareOptions.IgnoreKanaType | (int)SqlCompareOptions.IgnoreWidth) &
(int)compareOptions))
throw ADP.InvalidEnumerationValue(typeof(SqlCompareOptions), (int)compareOptions);
SetDefaultsForType(dbType);
_strName = name;
_lMaxLength = maxLength;
_lLocale = locale;
_eCompareOptions = compareOptions;
_useServerDefault = useServerDefault;
_isUniqueKey = isUniqueKey;
_columnSortOrder = columnSortOrder;
_sortOrdinal = sortOrdinal;
}
开发者ID:eerhardt,项目名称:corefx,代码行数:67,代码来源:SqlMetaData.cs
示例16: SetDefaultsForType
private void SetDefaultsForType(SqlDbType dbType)
{
if (SqlDbType.BigInt <= dbType && SqlDbType.DateTimeOffset >= dbType)
{
SqlMetaData smdDflt = sxm_rgDefaults[(int)dbType];
_sqlDbType = dbType;
_lMaxLength = smdDflt.MaxLength;
_bPrecision = smdDflt.Precision;
_bScale = smdDflt.Scale;
_lLocale = smdDflt.LocaleId;
_eCompareOptions = smdDflt.CompareOptions;
}
}
开发者ID:eerhardt,项目名称:corefx,代码行数:13,代码来源:SqlMetaData.cs
示例17: SetDefaultsForType
// Internal setter to be used by constructors only! Modifies state!
private void SetDefaultsForType( SqlDbType dbType )
{
SmiMetaData smdDflt = GetDefaultForType( dbType );
_databaseType = dbType;
_maxLength = smdDflt.MaxLength;
_precision = smdDflt.Precision;
_scale = smdDflt.Scale;
_localeId = smdDflt.LocaleId;
_compareOptions = smdDflt.CompareOptions;
_clrType = null;
_isMultiValued = smdDflt._isMultiValued;
_fieldMetaData = smdDflt._fieldMetaData; // This is ok due to immutability
_extendedProperties = smdDflt._extendedProperties; // This is ok due to immutability
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:15,代码来源:SmiMetaData.cs
注:本文中的SqlCompareOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论