Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Tags: CSharp,INcbServices,KnownTypeContainer,List,HeaderAuthen,UserDesc,IR_CodeAccess, Created At: 10/24/2016 8:06:54 PMViews:

HTML view:
Copy Source | Copy HTML
  1. namespace DynamicServiceProxy
  2. {
  3.     using System.Data;
  4.     using System.Reflection;
  5.     using EIPTypes;
  6.     using System;
  7.     using System.Collections.Generic;
  8.     using System.ServiceModel;
  9.  
  10.     [ServiceContract]
  11.     [XmlSerializerFormat]
  12.     [ServiceKnownType("GetAllMyKnownTypes", typeof(KnownTypeContainer))]
  13.     public partial interface INcbServices
  14.     {
  15.         //-------Метод GetRegNumSwayA -------------
  16.         // Врзвращает регистрационный номер для принятого документа (для НЦБ)
  17.         [OperationContract(
  18.             Action = "http://tempuri.org/GetRegNumSwayA",
  19.             ReplyAction = "http://tempuri.org/"
  20.             )]
  21.         string GetRegNumSwayA(string sLocArcFileName, string sAbonentID);
  22.  
  23.         #region System
  24.  
  25.         /// <summary>
  26.         /// Системная функция передачи данных чежду узлами
  27.         /// </summary>
  28.         /// <param name="auth">Защита</param>
  29.         /// <param name="NcbServiceLink">Ссылка на сервис для вызова!</param>
  30.         /// <param name="NcbFuncName">Название операции для вызова!</param>
  31.         /// <param name="param">набор параметров</param>
  32.         /// <returns>объект результата выполнения</returns>
  33.         [OperationContract]
  34.         [XmlSerializerFormat]
  35.         object _DataTransfer(HeaderAuthen auth, object NcbServiceLink, object NcbFuncName, object[] param);
  36.  
  37.         #endregion
  38.     }
  39.  
  40.     /// <summary>
  41.     /// Набор вставляемых в котракт кастомных типов
  42.     /// </summary>
  43.     static class KnownTypeContainer
  44.     {
  45.         public static IEnumerable<Type> GetAllMyKnownTypes(ICustomAttributeProvider p)
  46.         {
  47.             return new List<Type>
  48.                                            {
  49.                                                typeof(HeaderAuthen),
  50.                                                typeof (UserDesc),
  51.                                                typeof(List<IR_CodeAccess>),
  52.                                                typeof (IR_CodeAccess),
  53.                                                typeof(DataSet),
  54.                                                typeof(SWayRetDataSet),
  55.                                                typeof(SWayRet)
  56.                                            };
  57.  
  58.         }
  59.     }
  60. }

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2018