コード例 #1
0
        public static void UpdateRegistration(this IApplicationRegistrationService applicationRegistrationService, ApplicationInfo applicationInfo)
        {
            Argument.IsNotNull(() => applicationRegistrationService);
            Argument.IsNotNull(() => applicationInfo);

            // Just a forward call to the register application, maybe in the future we will uninstall / install
            applicationRegistrationService.RegisterApplication(applicationInfo);
        }
        public static void UpdateRegistration([NotNull] this IApplicationRegistrationService applicationRegistrationService,
                                              [NotNull] ApplicationInfo applicationInfo)
        {
            if (applicationRegistrationService == null)
            {
                throw new ArgumentNullException(nameof(applicationRegistrationService));
            }

            if (applicationInfo == null)
            {
                throw new ArgumentNullException(nameof(applicationInfo));
            }

            // Just a forward call to the register application, maybe in the future we will uninstall / install
            applicationRegistrationService.RegisterApplication(applicationInfo);
        }
コード例 #3
0
        public MainViewModel(IApplicationRegistrationService applicationRegistrationService, IFileAssociationService fileAssociationService)
        {
            Argument.IsNotNull(() => applicationRegistrationService);
            Argument.IsNotNull(() => fileAssociationService);

            _applicationRegistrationService = applicationRegistrationService;
            _fileAssociationService = fileAssociationService;

            var entryAssembly = AssemblyHelper.GetEntryAssembly();
            Title = entryAssembly.Title();
            ApplicationInfo = new ApplicationInfo(entryAssembly);
            FileAssociations = "abc;xyz;txt";

            RegisterApplication = new Command(OnRegisterApplicationExecute, OnRegisterApplicationCanExecute);
            UnregisterApplication = new Command(OnUnregisterApplicationExecute, OnUnregisterApplicationCanExecute);
            AssociateFiles = new Command(OnAssociateFilesExecute, OnAssociateFilesCanExecute);
        }
コード例 #4
0
        public MainViewModel(IApplicationRegistrationService applicationRegistrationService, IFileAssociationService fileAssociationService)
        {
            Argument.IsNotNull(() => applicationRegistrationService);
            Argument.IsNotNull(() => fileAssociationService);

            _applicationRegistrationService = applicationRegistrationService;
            _fileAssociationService         = fileAssociationService;

            var entryAssembly = AssemblyHelper.GetEntryAssembly();

            Title            = entryAssembly.Title();
            ApplicationInfo  = new ApplicationInfo(entryAssembly);
            FileAssociations = "abc;xyz;txt";

            RegisterApplication   = new Command(OnRegisterApplicationExecute, OnRegisterApplicationCanExecute);
            UnregisterApplication = new Command(OnUnregisterApplicationExecute, OnUnregisterApplicationCanExecute);
            AssociateFiles        = new Command(OnAssociateFilesExecute, OnAssociateFilesCanExecute);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="TwoLeggedAuthorizationServer"/> class.
 /// </summary>
 /// <param name="relyingPartyName">The relying party name.</param>
 public TwoLeggedAuthorizationServer(string relyingPartyName, IApplicationRegistrationService applicationRegistrationService)
 {
     RelyingPartyName = relyingPartyName;
     ApplicationRegistrationService = applicationRegistrationService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TwoLeggedAuthorizationServer"/> class.
 /// The relying party name is read from the application configuration's appSettings key 'WindowsAzure.OAuth.RelyingPartyName'.
 /// </summary>
 /// <param name="applicationRegistrationService">The application registration service.</param>
 public TwoLeggedAuthorizationServer(IApplicationRegistrationService applicationRegistrationService)
     : this(ConfigurationManager.AppSettings["WindowsAzure.OAuth.RelyingPartyName"], applicationRegistrationService)
 {
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreeLeggedAuthorizationServer"/> class.
 /// </summary>
 /// <param name="relyingPartyName">The relying party name.</param>
 public ThreeLeggedAuthorizationServer(string relyingPartyName, IApplicationRegistrationService applicationRegistrationService)
 {
     RelyingPartyName = relyingPartyName;
     ApplicationRegistrationService = applicationRegistrationService;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreeLeggedAuthorizationServer"/> class.
 /// The relying party name is read from the application configuration's appSettings key 'WindowsAzure.OAuth.RelyingPartyName'.
 /// </summary>
 /// <param name="applicationRegistrationService">The application registration service.</param>
 public ThreeLeggedAuthorizationServer(IApplicationRegistrationService applicationRegistrationService)
     : this(ConfigurationManager.AppSettings["WindowsAzure.OAuth.RelyingPartyName"], applicationRegistrationService)
 {
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthorizationServerBase"/> class.
 /// </summary>
 /// <param name="relyingPartyName">The relying party name.</param>
 protected AuthorizationServerBase(string relyingPartyName, IApplicationRegistrationService applicationRegistrationService)
 {
     RelyingPartyName = relyingPartyName;
     ApplicationRegistrationService = applicationRegistrationService;
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthorizationServerBase"/> class.
 /// </summary>
 /// <param name="relyingPartyName">The relying party name.</param>
 protected AuthorizationServerBase(string relyingPartyName, IApplicationRegistrationService applicationRegistrationService)
 {
     RelyingPartyName = relyingPartyName;
     ApplicationRegistrationService = applicationRegistrationService;
 }