예제 #1
0
 /// <summary>
 /// 外部扩展程序集注册
 /// </summary>
 /// <param name="externalAssemblies"></param>
 /// <returns></returns>
 public virtual IJT808Config Register(params Assembly[] externalAssemblies)
 {
     if (externalAssemblies != null)
     {
         foreach (var easb in externalAssemblies)
         {
             MsgIdFactory.Register(easb);
             FormatterFactory.Register(easb);
             JT808_0X0200_Factory.Register(easb);
             JT808_0X0200_Custom_Factory.Register(easb);
             JT808_0X8103_Factory.Register(easb);
             JT808_0X8103_Custom_Factory.Register(easb);
             JT808_0x0900_Custom_Factory.Register(easb);
             JT808_0x8900_Custom_Factory.Register(easb);
             JT808_0x8500_2019_Factory.Register(easb);
             JT808_CarDVR_Up_Factory.Register(easb);
             JT808_CarDVR_Down_Factory.Register(easb);
         }
     }
     return(this);
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 protected GlobalConfigBase()
 {
     Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
     MsgSNDistributed            = new DefaultMsgSNDistributedImpl();
     Compress                    = new JT808GZipCompressImpl();
     SplitPackageStrategy        = new DefaultSplitPackageStrategyImpl();
     SkipCRCCode                 = false;
     MsgIdFactory                = new JT808MsgIdFactory();
     Encoding                    = Encoding.GetEncoding("GBK");
     FormatterFactory            = new JT808FormatterFactory();
     JT808_0X0200_Custom_Factory = new JT808_0x0200_Custom_Factory();
     JT808_0X0200_Factory        = new JT808_0x0200_Factory();
     JT808_0X8103_Custom_Factory = new JT808_0x8103_Custom_Factory();
     JT808_0X8103_Factory        = new JT808_0x8103_Factory();
     JT808_0x0900_Custom_Factory = new JT808_0x0900_Custom_Factory();
     JT808_0x8900_Custom_Factory = new JT808_0x8900_Custom_Factory();
     JT808_0x8500_2019_Factory   = new JT808_0x8500_2019_Factory();
     JT808_CarDVR_Up_Factory     = new JT808_CarDVR_Up_Factory();
     JT808_CarDVR_Down_Factory   = new JT808_CarDVR_Down_Factory();
     TerminalPhoneNoLength       = 12;
     Trim = true;
 }