展开

关键词

简单代码生成器原理剖析(二)

sb.AppendLine("{"); sb.AppendLine("partial class "+tableName+"DAL"); sb.AppendLine (");"); sb.AppendLine("return rows>0;"); sb.AppendLine("}"); sb.AppendLine sb.AppendLine("{"); sb.AppendLine("list.Add(ToModel(row));"); sb.AppendLine(" }"); sb.AppendLine("return list;"); sb.AppendLine("}"); sb.AppendLine sb.AppendLine("namespace "+args.Namespace+".BLL"); sb.AppendLine("{"); sb.AppendLine

34580

简单代码生成器原理剖析(一)

sb.AppendLine(" return null;"); sb.AppendLine("}"); sb.AppendLine ("return model1;"); sb.AppendLine("}"); sb.AppendLine("else"); sb.AppendLine sb.AppendLine("}"); sb.AppendLine("}"); sb.AppendLine("}"); File.WriteAllText 三层架构Demo.Model"); sb.AppendLine("{"); sb.AppendLine(""); sb.AppendLine ().GetAll();"); sb.AppendLine("}"); sb.AppendLine("}"); sb.AppendLine

59780
  • 广告
    关闭

    90+款云产品免费体验

    提供包括云服务器,云数据库在内的90+款云计算产品。打造一站式的云产品试用服务,助力开发者和企业零门槛上云。

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    SilverLight企业应用框架设计【四】实体层设计+为客户端动态生成服务代理(自己实现RiaService)

    (string.Format("public class {0}", ty.Name)); sb.AppendLine("{"); sb.AppendLine ("{"); sb.AppendLine("var si = new ServiceInvoker();"); sb.AppendLine )); } else { sb.AppendLine ("si.InvokeService();"); sb.AppendLine("}"); } sb.AppendLine sb.AppendLine("Completed(sender, e);"); sb.AppendLine("}"); sb.AppendLine

    7130

    C# WinForm捕获全局异常

    Exception ex,string backStr) { StringBuilder sb = new StringBuilder(); sb.AppendLine ("****************************异常文本****************************"); sb.AppendLine("【出现时间】:" sb.AppendLine("【异常信息】:" + ex.Message); sb.AppendLine("【堆栈调用】:" + ex.StackTrace); } else { sb.AppendLine("【未处理异常】:" + backStr); } sb.AppendLine("***************************************************************"); return

    38210

    动态We API层(动态生成js)

    ("(function (abp, angular) {"); script.AppendLine(""); script.AppendLine(" angular) {"); script.AppendLine(" return;"); script.AppendLine(" }" ('abp');"); script.AppendLine(" "); script.AppendLine(" abpModule.factory ());     sb.AppendLine();           sb.AppendLine(_localizationScriptManager.GetScript());     sb.AppendLine ();           sb.AppendLine(await _authorizationScriptManager.GetScriptAsync());     sb.AppendLine();

    59520

    使用NOPI读取Word、Excel文档内容

    表格 171 if (CaptureWordTable == "true") 172 { 173 sbFileText.AppendLine 图片 195 if (CaptureWordImage == "true") 196 { 197 sbFileText.AppendLine fs.Close(); 210 } 211 // 212 sbFileText.AppendLine (picTempName); 213 } 214 sbFileText.AppendLine("Capture Image End"); (paragraph.ParagraphText); 223 224 } 225 sbFileText.AppendLine("Capture Paragraph

    84960

    C#获取AD域中计算机和用户的信息

    (string.Format("UPN:{0}", userPrincipalSearchResult.UserPrincipalName)); 5 sb.AppendLine(string.Format ("姓氏Last Name:{0}", userPrincipalSearchResult.Surname)); 6 sb.AppendLine(string.Format("中间名:{0}" , userPrincipalSearchResult.MiddleName)); 7 sb.AppendLine(string.Format("Given Name/First Name名: ("描述:{0}", computerPrincipalSearchResult.Description)); 8 sb.AppendLine(string.Format("是否启用:{0}" )); 10 sb.AppendLine(string.Format("名称:{0}", computerPrincipalSearchResult.Name)); 11 sb.AppendLine

    1.4K70

    DocX在C#中的基本操作方法

    contains a ").Append("bold").Bold().Append(" word."); p1.AppendLine("Here is a cool ").AppendHyperlink(link).Append("."); p1.AppendLine(); p1.AppendLine( ; p1.AppendLine(); p1.AppendLine("Can you check this Table of figures ; p1.AppendLine(); // 在第1段后插入表格。 p2.AppendLine("Is it correct?")

    63180

    浅谈.Net反射 8

    ("Explore type " + t.Name + " methods:"); sb.AppendLine(String.Empty.PadLeft(50, '-')); MethodInfo [] methods = t.GetMethods(); foreach (MethodInfo method in methods) { sb.AppendLine("name:" + method.Name); sb.AppendLine("method:" + method.ToString()); sb.AppendLine("attributes:" + method.Attributes ); sb.AppendLine("--parameter type: " + param.ParameterType); sb.AppendLine("--parameter sb.AppendLine("--parameter HasDefaultValue: " + param.HasDefaultValue); } } Console.WriteLine

    20050

    .NET程序连接Oracle一次执行多行SQL的注意事项

    foreach (var entity in list) { sb.AppendLine("UPDATE BAANDB.TWHINH225" + companyId + " A"); sb.AppendLine("SET A.T$WVID = -999"); sb.AppendLine = '" + entity.OrderNumber + "'"); sb.AppendLine("AND A.T$OSET = " + entity.OrderSet) ; sb.AppendLine("AND A.T$PONO = " + entity.Line); sb.AppendLine("AND sb.AppendLine("AND A.T$PCKD = 2;"); } sb.AppendLine("END;"); try

    41330

    浅谈.Net反射 6

    ("TypeName:"); sb.AppendLine("Name: " + t.Name); sb.AppendLine("FullName: " + t.FullName); sb.AppendLine ("Namespace: " + t.Namespace); sb.AppendLine("other info:"); sb.AppendLine("BaseType: " + t.BaseType ); sb.AppendLine("UnderlyingSystemType: " + t.UnderlyingSystemType); sb.AppendLine("Type info:"); sb.AppendLine("IsEnum: " + t.IsEnum); sb.AppendLine("IsClass: " + t.IsClass); sb.AppendLine("IsArray ); sb.AppendLine("IsSealed: " + t.IsSealed); sb.AppendLine("IsPrimitive: " + t.IsPrimitive); sb.AppendLine

    18030

    C#使用Json.Net遍历Json

    1        StringBuilder builder=new StringBuilder(); 2 builder.AppendLine("{"); 3 builder.AppendLine("\"key1\":\"value1\","); 4 builder.AppendLine("\"key2\":\"value2\",") ; 5 builder.AppendLine("\"key3\":\"value3\","); 6 builder.AppendLine("\"key4 \":\"value4\","); 7 builder.AppendLine("\"key5\":\"value5\","); 8 builder.AppendLine ("\"key6\":\"value6\""); 9 builder.AppendLine("}"); 10 JObject jObject=JObject.Parse

    74730

    浅谈.Net反射 7

    ("Explore type " + t.Name + " fields:"); sb.AppendLine(String.Empty.PadLeft(50, '-')); foreach (FieldInfo fi in fields) { sb.AppendLine("name:" + fi.Name); sb.AppendLine("type:" + fi.FieldType); sb.AppendLine("attributes:" + fi.Attributes); sb.AppendLine(); } Console.WriteLine(sb.ToString :" + pi.Name ); sb.AppendLine("type:" + pi.PropertyType ); sb.AppendLine("CanRead:" + pi.CanRead ); sb.AppendLine("CanWrite:" + pi.CanWrite); sb.AppendLine("attributes:" + pi.Attributes);

    22010

    Silverlight多重表头实现

    >"); 236 sb.AppendLine("<ColumnDefinition/>"); 237 sb.AppendLine("<ColumnDefinition Width='Auto'/>"); 238 sb.AppendLine("</Grid.ColumnDefinitions>"); 239 sb.AppendLine ("</LinearGradientBrush>"); 249 sb.AppendLine("</Rectangle.Fill>"); 250 sb.AppendLine 266 sb.AppendLine("</ControlTemplate>"); 267 sb.AppendLine("</Setter.Value>") ; 268 sb.AppendLine("</Setter>"); 269 sb.AppendLine("</Style>"); 270

    18020

    在线视频的5种下载办法

    ) { if (line.IndexOf("#") < 0) { sb.AppendLine >"); sb.AppendLine("<metalink xmlns=\"urn:ietf:params:xml:ns:metalink\" version=\"4.0\" a0:version=\ "3.0.8\" xmlns:a0=\"http://www.downthemall.net/properties#\">"); sb.AppendLine("<generator>DownThemAll ("<url priority=\"100\" a0:usable=\"" + url + "\">" + url + "</url>"); sb.AppendLine("</file>"); date = date + 4; count++; } sb.AppendLine("</metalink>"); File.WriteAllText(@"C:\downloadList.meta4

    9810

    批量添删改操作(提升吞吐率)

    Oracle的技术 var sb = Pool.StringBuilder.Get(); sb.AppendLine("BEGIN"); sb.AppendLine(insert + ";"); sb.AppendLine update.IsNullOrEmpty()) { sb.AppendLine("WHEN DUP_VAL_ON_INDEX THEN"); sb.AppendLine(update + ";"); } else { //sb.AppendLine("WHEN OTHERS THEN"); sb.AppendLine("WHEN DUP_VAL_ON_INDEX THEN sb = Pool.StringBuilder.Get(); sb.Append(update); sb.AppendLine(";"); sb.AppendLine("IF(@@ROWCOUNT = 0)"); sb.AppendLine("BEGIN"); sb.Append(insert); sb.AppendLine(";"); sb.AppendLine("END;"); 来个批量更新用户的例子

    12820

    代码生成器原理及示例

    ).AppendLine(" ToModel(DataRow row)").Append(blanksString + "{"); sb.Append(blanksString + _tableName).AppendLine(" model=new " + _tableName + "();"); foreach (DataColumn col in ("> ListAll()"); sb.AppendLine("{"); sb.Append(blanksString+"List<").Append(_ sb.AppendLine("return list;"); sb.AppendLine("}"); //ListAll结束 sb.AppendLine(blanksString + " {return value;}"); sb.AppendLine(blanksString+"}");

    10650

    silverlight的独立存储

    catch (IsolatedStorageException ex) { sb.AppendLine (filePath + " contents:"); sb.AppendLine(contents); catch (IsolatedStorageException ex) { sb.AppendLine catch (IsolatedStorageException ex) { sb.AppendLine } //移除store store.Remove(); sb.AppendLine

    34950

    C#编写影院售票系统(A project with a higher amount of gold )(2:相关代码)

    sb.AppendLine("-----------------------------------------"); sb.AppendLine("电影名:" + ScheduleItem.Movie.MovieName (0, Seat.SeatNum.Length - 3); sb.AppendLine("座位号:" + text); sb.AppendLine("价格 :" + Price); sb.AppendLine("*****************************************"); sb.AppendLine (0, Seat.SeatNum.Length - 3); sb.AppendLine("座位号:" + text); sb.AppendLine("价格 (0, Seat.SeatNum.Length - 3); sb.AppendLine("座位号:" + text); sb.AppendLine("价格

    72650

    C# WinForm捕获全局异常

    ("****************************异常文本****************************");              sb.AppendLine("【出现时间】: = null)              {                                 sb.AppendLine("【异常类型】:" + ex.GetType().Name);                  sb.AppendLine("【异常信息】:" + ex.Message);                  sb.AppendLine("【堆栈调用】:" + ex.StackTrace );                  sb.AppendLine("【异常方法】:" + ex.TargetSite);                        }              else              {                  sb.AppendLine("【未处理异常】:" + backStr);              }              sb.AppendLine

    1.3K10

    扫码关注腾讯云开发者

    领取腾讯云代金券