Ejemplo n.º 1
0
        /// <summary>
        /// Uninstall a package from a given console based on its package full name.
        /// </summary>
        /// <param name="systemIpAddress">The IP address of the console to be affected.</param>
        /// <param name="package">The package to be uninstalled.</param>
        public void UninstallPackage(string systemIpAddress, XboxPackageDefinition package)
        {
            this.ThrowIfDisposed();
            this.ThrowIfInvalidSystemIpAddress(systemIpAddress);

            this.PerformXdkAction(
                systemIpAddress,
                () => this.UninstallPackageImpl(systemIpAddress, package),
                string.Format(CultureInfo.InvariantCulture, "Failed to uninstall package with full name '{0}'", package == null || string.IsNullOrEmpty(package.FullName) ? "null" : package.FullName));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the XboxPackage class.
        /// </summary>
        /// <param name="definition">An object that defines this package.</param>
        /// <param name="console">The console that this package is associated with.</param>
        internal XboxPackage(XboxPackageDefinition definition, XboxConsole console)
            : base(console)
        {
            if (definition == null)
            {
                throw new ArgumentNullException("definition");
            }

            this.Definition = definition;

            this.Applications = definition.ApplicationDefinitions.Select(appDef => new XboxApplication(appDef, this, console));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Enables or disables debug mode for the Package.
        /// </summary>
        /// <param name="systemIpAddress">The "System Ip" address of the Xbox kit.</param>
        /// <param name="package">The package to be set debug mode for.</param>
        /// <param name="enabled">The value indicating whether debug mode should be enabled or disabled.</param>
        public void SetDebugMode(string systemIpAddress, XboxPackageDefinition package, bool enabled)
        {
            this.ThrowIfDisposed();
            this.ThrowIfInvalidSystemIpAddress(systemIpAddress);

            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            this.PerformXdkAction(
                systemIpAddress,
                () => this.SetDebugModeImpl(systemIpAddress, package, enabled),
                string.Format(CultureInfo.InvariantCulture, "Failed to set debug mode ({1}) for package: {0}", package.FullName, enabled));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Unconstrains a constrained package.
        /// </summary>
        /// <param name="systemIpAddress">The "System Ip" address of the Xbox kit.</param>
        /// <param name="package">The package to be unconstrained.</param>
        public void UnconstrainPackage(string systemIpAddress, XboxPackageDefinition package)
        {
            this.ThrowIfDisposed();
            this.ThrowIfInvalidSystemIpAddress(systemIpAddress);

            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            this.PerformXdkAction(
                systemIpAddress,
                () => this.UnconstrainPackageImpl(systemIpAddress, package),
                string.Format(CultureInfo.InvariantCulture, "Failed to Unconstrain package: {0}", package.FullName));
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Uninstall a package from a given console based on its package full name.
 /// </summary>
 /// <param name="systemIpAddress">The IP address of the console to be affected.</param>
 /// <param name="package">The package to be uninstalled.</param>
 protected virtual void UninstallPackageImpl(string systemIpAddress, XboxPackageDefinition package)
 {
     throw new XboxConsoleFeatureNotSupportedException(NotSupportedMessage);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Provides the adapter-specific implementation of the "QueryPackageExecutionState" method.
 /// </summary>
 /// <param name="systemIpAddress">The "System Ip" address of the Xbox kit.</param>
 /// <param name="package">The package for which the execution state shall be retrieved.</param>
 /// <returns>The current execution state of the package given by the <paramref name="package"/> parameter.</returns>
 protected virtual PackageExecutionState QueryPackageExecutionStateImpl(string systemIpAddress, XboxPackageDefinition package)
 {
     throw new XboxConsoleFeatureNotSupportedException(NotSupportedMessage);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Provides the adapter-specific implementation of the "DebugEnable" method.
 /// </summary>
 /// <param name="systemIpAddress">The "System Ip" address of the Xbox kit.</param>
 /// <param name="package">The package to be set debug mode for.</param>
 /// <param name="enabled">The value indicating whether debug mode should be enabled or disabled.</param>
 protected virtual void SetDebugModeImpl(string systemIpAddress, XboxPackageDefinition package, bool enabled)
 {
     throw new XboxConsoleFeatureNotSupportedException(NotSupportedMessage);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Retrieves the execution state of the given package.
        /// </summary>
        /// <param name="systemIpAddress">The "System Ip" address of the Xbox kit.</param>
        /// <param name="package">The package for which the execution state shall be retrieved.</param>
        /// <returns>The current execution state of the package given by the <paramref name="package"/> parameter.</returns>
        public PackageExecutionState QueryPackageExecutionState(string systemIpAddress, XboxPackageDefinition package)
        {
            this.ThrowIfDisposed();
            this.ThrowIfInvalidSystemIpAddress(systemIpAddress);

            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            return(this.PerformXdkFunc(
                       systemIpAddress,
                       () => this.QueryPackageExecutionStateImpl(systemIpAddress, package),
                       string.Format(CultureInfo.InvariantCulture, "Failed to query execution state of package: {0}", package.FullName)));
        }