摘要: 项目介绍 本项目目的在于完成公司的一些定时调度任务而开发,前期本打算使用Quartz集群方案实现,后发现项目并没有到一定要到集群方案的窘境,就自动跳过了该方案,考虑到一台服务器的异步方案实现。 应用场景定时执行Job定时调度接口定时抽取数据 等场景使用Quartz.net实现的调度在本人的另一开源地 阅读全文
posted @ 2018-08-10 05:59 hornet_team 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-01-09 23:05 hornet_team 阅读(182) 评论(0) 推荐(0) 编辑
摘要: /// /// Redis 帮助类文件 /// public class RedisHelper : IDisposable { /// /// 针对Log4net的实例 /// private static readonly ILog Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().D... 阅读全文
posted @ 2015-12-29 11:42 hornet_team 阅读(1238) 评论(0) 推荐(0) 编辑
摘要: 1.二进制转换为图片 MemoryStream ms = new MemoryStream(bytes); ms.Position = 0; Image img = Image.FromStream(ms); ms.Close(); 2.C#中byte[]与string的转换代码 1):var converter = new System.Text.UnicodeEncoding(); byte[... 阅读全文
posted @ 2015-12-18 12:47 hornet_team 阅读(944) 评论(0) 推荐(0) 编辑
摘要: 在WCF的根目录下添加跨域文件 阅读全文
posted @ 2015-11-20 09:04 hornet_team 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1.只能对 Type.IsGenericParameter 为 True 的类型调用方法 对于此错误,一般常见在虚拟实体,但是要把条件拼接在Expression中,通常是因为该字段在数据库中是可空的,做法就是将此条件在Linq Query之前先过来,不要用来过滤虚拟的实体,用来过滤原生的实体 阅读全文
posted @ 2015-10-27 13:22 hornet_team 阅读(719) 评论(0) 推荐(0) 编辑
摘要: 我们知道Linq to sharepoint 实际最终还是转化成了CALM来对Sharepoint进行访问,那么我们怎样才能知道我们编写的Query语句最终转化成的CALM语句是什么样子呢。 我们可以使用如下方法来达到我们的目的。 1.首先在我们的Sharepoint项目中新建一个名为CAMLDebug的类,如图: CALMDebug.cs代码如下: using System;... 阅读全文
posted @ 2015-10-27 13:10 hornet_team 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 1.添加引用using Microsoft.SqlServer.Management.Smo; using Microsoft.SqlServer.Management.Common;2.Backup bkpDatabase = new Backup(); // Set the backup type to a database backup bkpDatabase.Action = Backup... 阅读全文
posted @ 2015-09-07 16:36 hornet_team 阅读(467) 评论(1) 推荐(0) 编辑
摘要: 1.下面是一个C#的控制台以代码来说明处理 using System.Data.SqlClient; class Program { static void Main() { string connectionString = GetConnectionString(); using (SqlConnection sourceConnection =... 阅读全文
posted @ 2015-09-02 09:30 hornet_team 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 用WebRequest和WebClient,两种方式,请求一个由http服务发布的应用,结果出现异常。 有三种,1、System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine 2、System.Net.WebException: 基础连接已经关闭: 连接被意外关闭。3、System.Net.ProtocolViolationExc... 阅读全文
posted @ 2015-08-27 08:36 hornet_team 阅读(1356) 评论(0) 推荐(1) 编辑