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


C# SqlString类代码示例

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


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

示例1: RegExpSearch

    public static SqlString RegExpSearch(SqlString source, [SqlFacet(MaxSize = 4000)] SqlString pattern)
    {
        if (source.IsNull || pattern.IsNull)
            return SqlString.Null;

        return Regex.Match(source.Value, pattern.Value).Value;
    }
开发者ID:mrTea1,项目名称:Tea-SQL,代码行数:7,代码来源:RegExpSearch.cs

示例2: IsNucX

 public static SqlInt32 IsNucX(SqlInt64 posStart, SqlString misMNuc, SqlInt64 refPos, SqlString refNuc, SqlString countNuc)
 {
     SqlInt32 result;
     Dictionary<long, string> mutationPositions = new Dictionary<long, string>();
     string mutationPattern = @"[0-9]+ [ACGTN]+";
     MatchCollection matches = Regex.Matches(misMNuc.Value, mutationPattern);
     foreach (Match match in matches)
     {
         var foundMutation = match.Value;
         string[] foundMutParts = foundMutation.Split(' ');
         long mutStartPos = posStart.Value + Int32.Parse(foundMutParts[0]);
         var mutNuc = foundMutParts[1];
         mutationPositions.Add(mutStartPos, mutNuc);
     }
     string mutValue;
     if (mutationPositions.TryGetValue(refPos.Value, out mutValue))
     {
         result = new SqlInt32(countNuc.Value.Equals(mutValue) ? 1 : 0);
     }
     else
     {
         result = new SqlInt32(countNuc.Value.Equals(refNuc.Value) ? 1 : 0);
     }
     return result;
 }
开发者ID:szalaigj,项目名称:LoaderToolkit,代码行数:25,代码来源:IsNucX.cs

示例3: LookupText

 public static SqlString LookupText(SqlString param, SqlString lookupValues)
 {
     var found = LookupValue(param, lookupValues);
     return !String.IsNullOrWhiteSpace(found)
         ? new SqlString(found, param.LCID)
         : SqlString.Null;
 }
开发者ID:raziqyork,项目名称:Geeks.SqlUtils,代码行数:7,代码来源:Lookup.cs

示例4: RegexGroup

 public static SqlChars RegexGroup( SqlChars input, SqlString pattern, SqlString name )
 {
     Regex regex = new Regex( pattern.Value, Options );
       Match match = regex.Match( new string( input.Value ) );
       return match.Success ?
         new SqlChars( match.Groups[name.Value].Value ) : SqlChars.Null;
 }
开发者ID:remifrazier,项目名称:SPCClogin_Public,代码行数:7,代码来源:RegexGroup.cs

示例5: CompStrings

 public CompStrings(SqlString from, SqlString to, SqlString replace, SqlString tolerance, SqlString comp) {
     this.from = from.ToString();
     this.to = to.ToString();
     this.replace = replace.ToString();
     this.tolerance = tolerance.ToString();
     this.comp = comp.ToString();
 }
开发者ID:wbuchanan,项目名称:whyWontSQLServerImplementRegexNatively,代码行数:7,代码来源:CompStrings.cs

示例6: DualFillRow

 private static void DualFillRow(Object obj, ref SqlString item)
 {
     if (obj != null)
     {
         item = (string)obj;
     }
 }
开发者ID:JodenSoft,项目名称:JodenSoft,代码行数:7,代码来源:Dual.cs

示例7: SqlToken

		public SqlToken(SqlTokenType tokenType, SqlString sql, int sqlIndex, int length)
		{
			_tokenType = tokenType;
			_sql = sql;
			_sqlIndex = sqlIndex;
			_length = length;
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:7,代码来源:SqlToken.cs

示例8: RegExpCheck

    public static SqlBoolean RegExpCheck(SqlString source, [SqlFacet(MaxSize = 4000)] SqlString pattern)
    {
        if (source.IsNull || pattern.IsNull)
            return SqlBoolean.Null;

        return Regex.IsMatch(source.Value, pattern.Value);
    }
开发者ID:mrTea1,项目名称:Tea-SQL,代码行数:7,代码来源:RegExpCheck.cs

示例9: SampleWSPut

    public static void SampleWSPut(SqlString weburl, out SqlString returnval)
    {
        string url = Convert.ToString(weburl);
        string feedData = string.Empty;
        try {
            HttpWebRequest request = null;
            HttpWebResponse response = null;
            Stream stream = null;
            StreamReader streamReader = null;

            request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "PUT"; // you have to change to
            //PUT/POST/GET/DELETE based on your scenerio…
            request.ContentLength = 0;
            response = (HttpWebResponse)request.GetResponse();
            stream = response.GetResponseStream();
            streamReader = new StreamReader(stream);
            feedData = streamReader.ReadToEnd();

            response.Close();
            stream.Dispose();
            streamReader.Dispose();

        } catch (Exception ex) {
            SqlContext.Pipe.Send(ex.Message.ToString());
        }
        returnval = feedData;
    }
开发者ID:alangoes,项目名称:ExampleAccessDLLBySQLServerStoredProcedure,代码行数:28,代码来源:Class1.cs

示例10: FillRowFromSequencesAndExtraAndMissingNuc

    public static void FillRowFromSequencesAndExtraAndMissingNuc(object tableTypeObject, out SqlString mismatch, out SqlString indel)
    {
        var tableType = (MismatchInDelRow)tableTypeObject;

        mismatch = tableType.Mismatch;
        indel = tableType.Indel;
    }
开发者ID:szalaigj,项目名称:LoaderToolkit,代码行数:7,代码来源:ObtainMismatchAndInDel.cs

示例11: SampleWSPost

    public static void SampleWSPost(SqlString weburl, out SqlString returnval)
    {
        string url = Convert.ToString(weburl);
        string feedData = string.Empty;
        try {
            HttpWebRequest request = null;
            HttpWebResponse response = null;
            Stream stream = null;
            StreamReader streamReader = null;

            request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "POST";
            response = (HttpWebResponse)request.GetResponse();
            stream = response.GetResponseStream();
            streamReader = new StreamReader(stream);
            feedData = streamReader.ReadToEnd();
            response.Close();
            stream.Dispose();
            streamReader.Dispose();

        } catch (Exception ex) {
            SqlContext.Pipe.Send(ex.Message.ToString());
        }
        returnval = feedData;
    }
开发者ID:alangoes,项目名称:ExampleAccessDLLBySQLServerStoredProcedure,代码行数:25,代码来源:Class1.cs

示例12: Or3

 public static SqlString Or3(
     SqlString text0,
     SqlString text1,
     SqlString text2)
 {
     return OrSqlString(text0, text1, text2);
 }
开发者ID:raziqyork,项目名称:Geeks.SqlUtils,代码行数:7,代码来源:Or.SqlString.cs

示例13: ParamDateTimeTemp

 public static SqlDateTime ParamDateTimeTemp(SqlXml Xml, SqlString Name)
 {
     String ValueType;
       String Value = GetValueFromXMLAttribute(Xml, Name, out ValueType);
       if (Value == null) return new SqlDateTime();
       SqlDateTime Result;
       try
       {
     Result = new SqlDateTime(XmlConvert.ToDateTime(Value, XmlDateTimeSerializationMode.RoundtripKind));
       }
       catch (Exception Error)
       {
     throw new System.Exception("Error convert Param = \"" + Name.Value.ToString() + "\" Value = \"" + Value.ToString() + "\" to DateTime: " + Error.Message);
       }
       if (ValueType != null && ValueType != "")
       {
     // year, month, day, hour, minute, second
     switch (ValueType)
     {
       case "1": return Result.Value.Date.AddDays(1);
       default: return Result;
     }
       }
       return Result;
 }
开发者ID:APouchkov,项目名称:ExtendedStoredProcedures,代码行数:25,代码来源:XmlParams.cs

示例14: GetParam

 public static int GetParam(SqlString s)
 {
     // 在此处放置代码
     Regex _break_comp = new Regex(@"\{\d\}", RegexOptions.Compiled);
     return  _break_comp.Matches(s.ToString() ).Count;
     //return new SqlString("Hello");
 }
开发者ID:fatbudy,项目名称:CSSM,代码行数:7,代码来源:Function1.cs

示例15: String_Compare_Equal

 public void String_Compare_Equal()
 {
     const string s = "Test string in UTF-16 LE";
     var sqlString1 = new SqlString(s);
     var sqlString2 = new SqlString(s);
     Assert.AreEqual(0, sqlString1.CompareTo(sqlString2));
 }
开发者ID:prepare,项目名称:deveeldb,代码行数:7,代码来源:SqlStringTests.cs


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