资源简介
WeChatSamplerBuilder控制台例子
代码片段和文件信息
#region Apache License Version 2.0
/*----------------------------------------------------------------
Copyright 2019 Suzhou Senparc Network Technology Co.Ltd.
Licensed under the Apache License Version 2.0 (the “License“); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing software distributed under the
License is distributed on an “AS IS“ BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND
either express or implied. See the License for the specific language governing permissions
and limitations under the License.
Detail: https://github.com/Senparc/Senparc.CO2NET/blob/master/LICENSE
----------------------------------------------------------------*/
#endregion Apache License Version 2.0
/*----------------------------------------------------------------
Copyright (C) 2019 Senparc
文件名:Program.cs
文件功能描述:Console 示例(同样适用于 WinForm 和 WPF)
创建标识:Senparc - 20190108
----------------------------------------------------------------*/
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Senparc.CO2NET;
using Senparc.CO2NET.Cache;
using Senparc.CO2NET.Cache.Memcached;
using Senparc.CO2NET.RegisterServices;
using Senparc.Weixin.Entities;
using Senparc.Weixin.RegisterServices;
using Senparc.Weixin.WxOpen;
using Senparc.Weixin.Work;
using Senparc.Weixin.TenPay;
using Senparc.Weixin.Open;
using System;
using Senparc.CO2NET.Utilities;
using System.IO;
using Senparc.Weixin.Open.ComponentAPIs;
using Senparc.CO2NET.Extensions;
namespace Senparc.Weixin.MP.Sample.Consoles
{
class Program
{
static void Main(string[] args)
{
var dt1 = SystemTime.Now;
var configBuilder = new ConfigurationBuilder();
configBuilder.AddJsonFile(“appsettings.json“ false false);
Console.WriteLine(“完成 appsettings.json 添加“);
var config = configBuilder.Build();
Console.WriteLine(“完成 ServiceCollection 和 ConfigurationBuilder 初始化“);
//更多绑定操作参见:https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.2
var senparcSetting = new SenparcSetting();
var senparcWeixinSetting = new SenparcWeixinSetting();
config.GetSection(“SenparcSetting“).Bind(senparcSetting);
config.GetSection(“SenparcWeixinSetting“).Bind(senparcWeixinSetting);
var services = new ServiceCollection();
services.AddMemoryCache();//使用本地缓存必须添加
/*
* CO2NET 是从 Senparc.Weixin 分离的底层公共基础模块,经过了长达 6 年的迭代优化,稳定可靠。
* 关于 CO2NET 在所有项目中的通用设置可参考 CO2NET 的 Sample:
* https://github.com/Senparc/Senparc.CO2NET/blob/master/Sample/Senparc.CO2NET.Sample.netcore/Star
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-09-29 21:32 console\
目录 0 2020-09-29 21:32 console\.vs\
目录 0 2020-09-29 21:37 console\.vs\Senparc.Weixin.MP.Sample.Consoles.vs2019\
目录 0 2020-09-29 21:37 console\.vs\Senparc.Weixin.MP.Sample.Consoles.vs2019\DesignTimeBuild\
文件 907798 2020-09-29 21:53 console\.vs\Senparc.Weixin.MP.Sample.Consoles.vs2019\DesignTimeBuild\.dtbcache.v2
目录 0 2020-09-29 21:32 console\.vs\Senparc.Weixin.MP.Sample.Consoles.vs2019\v16\
文件 53248 2020-09-29 21:53 console\.vs\Senparc.Weixin.MP.Sample.Consoles.vs2019\v16\.suo
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\
文件 17106 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\Program.cs
文件 1968 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\Senparc.Weixin.MP.Sample.Consoles.csproj
文件 3057 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\appsettings.json
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\bin\
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\bin\Debug\
目录 0 2020-09-30 13:22 console\Senparc.Weixin.MP.Sample.Consoles\bin\Debug\netcoreapp3.1\
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\bin\Release\
目录 0 2020-09-30 13:22 console\Senparc.Weixin.MP.Sample.Consoles\bin\Release\netcoreapp3.1\
目录 0 2020-09-29 21:53 console\Senparc.Weixin.MP.Sample.Consoles\obj\
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\
目录 0 2020-09-30 11:58 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\
文件 190 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\.NETCoreAppVersion=v3.1.AssemblyAttributes.cs
文件 1082 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.AssemblyInfo.cs
文件 42 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.AssemblyInfoInputs.cache
文件 91712 2020-09-29 21:33 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.assets.cache
文件 0 2020-09-29 21:35 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.csproj.FileListAbsolute.txt
文件 235563 2020-09-30 11:58 console\Senparc.Weixin.MP.Sample.Consoles\obj\Debug\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.csprojAssemblyReference.cache
目录 0 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\
目录 0 2020-09-30 11:58 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\netcoreapp3.1\
文件 190 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\netcoreapp3.1\.NETCoreAppVersion=v3.1.AssemblyAttributes.cs
文件 1084 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.AssemblyInfo.cs
文件 42 2020-09-29 20:36 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.AssemblyInfoInputs.cache
文件 91712 2020-09-30 11:58 console\Senparc.Weixin.MP.Sample.Consoles\obj\Release\netcoreapp3.1\Senparc.Weixin.MP.Sample.Consoles.assets.cache
............此处省略7个文件信息
- 上一篇:C#的Ftp客户端+服务端源码
- 下一篇:数据采集卡读取(USB)
相关资源
- C# 8 Code sample:Using declarations(ef-cor
- ZedGraphV515SampleCS_(动态实时曲线-全部
- asp.net 源码:微信公众号接口,微信企
- c# serialport sample(3)
- RegExBuilder
- c# serialport sample(1)
- c# win10ssk皮肤文件
- HY.CodeBuilder.rar
- c# GDI+ 完整
- Pylon.NET Samples
- Orm Dapper Sample
- VCDotNetRcwSample
- SerialportSample(3)2008 c#串口通信
- ext-gantt-net-sample1.8 Ext Gantt甘特图(a
- PluginSample 构建插件式的应用程序框架
- c# serialport sample(2)
- Download netcoreapp2.0 unit tests sample - 1.4
- 适用于Powerbuilder2017-2018的破解补丁
- DockSample 仿VS 界面(WeifenLuo.WinFormsUI
- AForge.NET-sample
- C# DataGridViewContextMenuSample (DataGridVi
- C# BindingSourceSample (使用BindingSource類
- Microsoft OCR Library Sample
- 使用SignalR实时推送CPU使用率SignalrSa
- jquery自定义表单(formbuilder)
- WeChatAuthorizedLoginDemo_微信授权登录DE
- C#微信企业号发送消息Sample
- Jwt Sample(asp.net core)
- 代码自动生成工具源码(HaoCodeBuilde
- P+F r2000 sample
评论
共有 条评论