Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="session">The session for this client.</param>
        public SalesForceClient(SalesForceSession session)
        {
            if (session == null)
            {
                throw new ArgumentNullException("session");
            }

            _session        = session;
            _isSessionOwned = false;

            Data       = new DataSystem(this);
            Meta       = new MetaSystem(this);
            Checkout   = new CheckoutSystem(this);
            Test       = new TestSystem(this);
            Diagnostic = new DiagnosticSystem(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="credential">The credential to use for the client.</param>
        public SalesForceClient(SalesForceCredential credential)
        {
            if (credential == null)
            {
                throw new ArgumentNullException("credential");
            }

            _session        = new SalesForceSession(credential, GetDefaultConfiguration());
            _isSessionOwned = true;

            Data       = new DataSystem(this);
            Meta       = new MetaSystem(this);
            Checkout   = new CheckoutSystem(this);
            Test       = new TestSystem(this);
            Diagnostic = new DiagnosticSystem(this);
        }