/// <summary>
        /// Initializes a new instance of the <see cref="RpsAuthenticator"/> class.
        /// </summary>
        /// <param name="config">Configuration for RPS (Live ID) authentication.</param>
        /// <param name="clientHandler">Client handler for RPS auth requests.</param>
        /// <param name="delegatingHandlers">Delegating handlers for RPS auth requests.</param>
        public RpsAuthenticator(IRpsConfig config, HttpClientHandler clientHandler, params DelegatingHandler[] delegatingHandlers)
        {
            Config = config;

            tokenClient = new RestfulClient(config.AuthUrl, EnhanceClientHandler(clientHandler), delegatingHandlers);
            lockSlim    = new ReaderWriterLockSlim();
            cache       = new MemoryCache(new MemoryCacheOptions());
        }
Ejemplo n.º 2
0
        public ScriptExecutor(IRpsConfig config, ExternalCommandData commandData, string message, ElementSet elements)
        {
            _config = config;

            _revit = commandData.Application;
            _commandData = commandData;
            _elements = elements;
            _message = message;

            _uiControlledApplication = null;
        }
Ejemplo n.º 3
0
        public ScriptExecutor(IRpsConfig config, ExternalCommandData commandData, string message, ElementSet elements)
        {
            _config = config;

            _revit       = commandData.Application;
            _commandData = commandData;
            _elements    = elements;
            _message     = message;

            _uiControlledApplication = null;
        }
Ejemplo n.º 4
0
        public ScriptExecutor(IRpsConfig config, UIApplication uiApplication, UIControlledApplication uiControlledApplication)
        {
            _config = config;

            _revit = uiApplication;
            _uiControlledApplication = uiControlledApplication;

            // note, if this constructor is used, then this stuff is all null
            // (I'm just setting it here to be explete - this constructor is
            // only used for the startupscript)
            _commandData = null;
            _elements = null;
            _message = null;
        }
Ejemplo n.º 5
0
        public ScriptExecutor(IRpsConfig config, UIApplication uiApplication, UIControlledApplication uiControlledApplication)
        {
            _config = config;

            _revit = uiApplication;
            _uiControlledApplication = uiControlledApplication;

            // note, if this constructor is used, then this stuff is all null
            // (I'm just setting it here to be explete - this constructor is
            // only used for the startupscript)
            _commandData = null;
            _elements    = null;
            _message     = null;
        }
Ejemplo n.º 6
0
        public ScriptExecutor(IRpsConfig config)
        {
            _config = config;

            _message = "";
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="RpsAuthenticator"/> class.
 /// Base constructor.
 /// </summary>
 /// <param name="config">Configuration for RPS (Live ID) configuration.</param>
 public RpsAuthenticator(IRpsConfig config)
     : this(config, null)
 {
 }