Ejemplo n.º 1
0
 public void Add(DomainClient client)
 {
     if (Contains(client) == false)
     {
         clients.Add(client);
     }
 }
Ejemplo n.º 2
0
 protected override void ProcessRecord()
 {
     base.ProcessRecord();
     try
     {
         client?.Dispose();
         int timeout = GetPreferredTimeout();
         WriteDebug($"Cmdlet Timeout : {timeout} milliseconds.");
         client = new DomainClient(AuthProvider, new Oci.Common.ClientConfiguration
         {
             RetryConfiguration = retryConfig,
             TimeoutMillis      = timeout,
             ClientUserAgent    = PSUserAgent
         });
         string region = GetPreferredRegion();
         if (region != null)
         {
             WriteDebug("Choosing Region:" + region);
             client.SetRegion(region);
         }
         if (Endpoint != null)
         {
             WriteDebug("Choosing Endpoint:" + Endpoint);
             client.SetEndpoint(Endpoint);
         }
     }
     catch (Exception ex)
     {
         TerminatingErrorDuringExecution(ex);
     }
 }
Ejemplo n.º 3
0
 public void Remove(DomainClient client)
 {
     if (Contains(client) == true)
     {
         clients.Remove(FindById(client.Id));
     }
 }
 public static ClientModel ClientToModel(this DomainClient @this)
 {
     return(new ClientModel
     {
         ClientId = @this.ClientId,
         ClientName = @this.ClientName
     });
 }
Ejemplo n.º 5
0
 public static InfrastructureClient ToInfrastructure(this DomainClient @this)
 {
     if (@this == null)
     {
         throw new ArgumentNullException();
     }
     return(new InfrastructureClient()
     {
         Name = @this.Name,
         Age = @this.Age
     });
 }
Ejemplo n.º 6
0
 public bool UpdateClient(int clientId, DomainClient client)
 {
     if (client != null)
     {
         _repository.Clients.UpdateClient(clientId, client.ToInfrastructure());
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            ItemRepositoryXml   itemRepo   = new ItemRepositoryXml("./MyCoffeeItems.xml");
            ClientRepositoryXml clientRepo = new ClientRepositoryXml("./MyClients.xml");
            DomainClient        client     = clientRepo.FindByName("Петров");
            DomainCart          cart       = new DomainCart(0, client);

            cart.Add(itemRepo.FindByName("Капучино"), 2);
            cart.Add(itemRepo.FindByName("Латте"), 1);
            cart.Bill.Issue();
            return;
        }
Ejemplo n.º 8
0
 public static ClientModel ToModel(this DomainClient @this)
 {
     if (@this == null)
     {
         throw new ArgumentNullException();
     }
     return(new ClientModel()
     {
         Name = @this.Name,
         Age = @this.Age
     });
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="IncludeScenariosTestProvider"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public IncludeScenariosTestProvider(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 10
0
 public ConfigurableDomainContext(DomainClient client, EntityContainer entityContainer)
     : base(client)
 {
     this._entityContainer = entityContainer;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="PrognozNBContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public PrognozNBContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 12
0
 private bool Contains(DomainClient client)
 {
     return(FindById(client.Id) != null);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AmbulanceSynchronizationDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public AmbulanceSynchronizationDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PandPDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public PandPDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SampleDataContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public SampleDataContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LeconDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public LeconDomainContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="fbs"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public fbs(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScheduleViewDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public ScheduleViewDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MarketSynthDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public MarketSynthDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 public RenderDomainContext(DomainClient domainClient) : base(domainClient)
 {
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NorthwindDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public NorthwindDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GlobalOfficeToolsDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public GlobalOfficeToolsDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public AuthenticationContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FacebookContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public FacebookContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 25
0
 public DomainBill(uint id, DomainClient client)
 {
     this.id     = id;
     this.client = client;
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public SearchContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QLThuebaoDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public QLThuebaoDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductsCatalogContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public ProductsCatalogContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContactsDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public ContactsDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="OrdersDomainContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public OrdersDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 31
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="LoggerContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public LoggerContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MockCustomerDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public MockCustomerDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 33
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="ReportBaseDomainContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public ReportBaseDomainContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VanLangContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public VanLangContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GlobalNamespaceTest_DomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public GlobalNamespaceTest_DomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BusinessContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public BusinessContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationDomainContextBase"/> class.
 /// </summary>
 /// <param name="domainClient">The <see cref="DomainClient"/> instance this <see cref="AuthenticationDomainContextBase"/> should use</param>
 protected AuthenticationDomainContextBase(DomainClient domainClient)
     : base(domainClient)
 {
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AttributeThrowingDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public AttributeThrowingDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GlossaryContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public GlossaryContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TestProvider_Inheritance1"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public TestProvider_Inheritance1(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserRegistrationContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public UserRegistrationContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 42
0
 public TestDataContext(DomainClient domainClient)
     : base(domainClient)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServerSideAsyncDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public ServerSideAsyncDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LibraryDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public LibraryDomainContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 45
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PostDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public PostDomainContext(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AdventureWorksContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public AdventureWorksContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 47
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RentingDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public RentingDomainContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UserRegistrationContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public UserRegistrationContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Constructor used to specify a DomainClient instance.
 /// </summary>
 /// <param name="domainClient">
 /// The DomainClient instance the DomainContext should use.
 /// </param>
 public ScrumBeeContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DomainServiceScenario2"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public DomainServiceScenario2(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LaboratoryDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public LaboratoryDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 52
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="mrzs05mMenuContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public mrzs05mMenuContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 53
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModuleDomainContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public ModuleDomainContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 54
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationService1"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public AuthenticationService1(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationContext"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public AuthenticationContext(DomainClient domainClient) : 
         base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 56
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DomainService1"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public DomainService1(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DomainService1"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this domain context.</param>
 public DomainService1(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationDomainContextBase"/> class.
 /// </summary>
 /// <param name="domainClient">The <see cref="DomainClient"/> instance this <see cref="AuthenticationDomainContextBase"/> should use</param>
 protected AuthenticationDomainContextBase(DomainClient domainClient) : base(domainClient)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseTypeConflicts"/> class with the specified <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">The DomainClient instance to use for this DomainContext.</param>
 public BaseTypeConflicts(DomainClient domainClient) :
     base(domainClient)
 {
     this.OnCreated();
 }
Ejemplo n.º 60
0
 /// <summary>
 /// Инициализирует новый экземпляр класса <see cref="GraphVyrabDomainContext"/> с указанным параметром <paramref name="domainClient"/>.
 /// </summary>
 /// <param name="domainClient">Экземпляр DomainClient для использования в этом контексте DomainContext.</param>
 public GraphVyrabDomainContext(DomainClient domainClient)
     : base(domainClient)
 {
     this.OnCreated();
 }