System.Data.Common.ADP.IsEmpty(string)

Here are the examples of the csharp api class System.Data.Common.ADP.IsEmpty(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal string BuildQuotedString(string quotePrefix, string quoteSuffix, string unQuotedString) {
            StringBuilder resultString = new StringBuilder();
            if (ADP.IsEmpty(quotePrefix) == false) {
                resultString.Append(quotePrefix);
            }

            // Assuming that the suffix is escaped by doubling it. i.e. foo"bar becomes "foo""bar".
            if (ADP.IsEmpty(quoteSuffix) == false) {
                resultString.Append(unQuotedString.Replace(quoteSuffix,quoteSuffix+quoteSuffix));
                resultString.Append(quoteSuffix);
            }
            else {
                resultString.Append(unQuotedString);
            }

            return resultString.ToString();
        }

2. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal string FixUpDecimalSeparator(string numericString,
                                                     Boolean formatLiteral,
                                                     string decimalSeparator,
                                                     char[] exponentSymbols) {
            String returnString;
            // don't replace the decimal separator if the string is in exponent format
            if (numericString.IndexOfAny(exponentSymbols) == -1){

                // if the user has set a decimal separator use it, if not use the current culture's value
                if (ADP.IsEmpty(decimalSeparator) == true) {
                   decimalSeparator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;
                }
                if (formatLiteral == true){
                    returnString =  numericString.Replace(".",decimalSeparator);
                }
                else {
                    returnString =  numericString.Replace(decimalSeparator,".");
                }
            }
            else {
                returnString = numericString;
            }
            return returnString;
        }

3. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
static internal InvalidOperationException ColumnSchemaMissing(string cacheColumn, string tableName, string srcColumn) {
            if (ADP.IsEmpty(tableName)) {
                return InvalidOperation(Res.GetString(Res.ADP_ColumnSchemaMissing1, cacheColumn, tableName, srcColumn));
            }
            return DataMapping(Res.GetString(Res.ADP_ColumnSchemaMissing2, cacheColumn, tableName, srcColumn));
        }

4. Example

Project: referencesource
Source File: AdapterUtil.cs
View license
[ResourceExposure(ResourceScope.None)]
        [ResourceConsumption(ResourceScope.Machine, ResourceS/n ..... /n //View Source file for more details /n }