public SilverlightAssemblyResolver(AppDomain appDomain, IServiceProvider serviceProvider) { this.projectManager = ServiceExtensions.ProjectManager(serviceProvider); this.platformService = ServiceExtensions.GetService <IPlatformService>(serviceProvider); this.satelliteAssemblyResolver = ServiceExtensions.GetService <ISatelliteAssemblyResolver>(serviceProvider); this.messageService = ServiceExtensions.GetService <IMessageDisplayService>(serviceProvider); this.appDomain = appDomain; this.appDomain.AssemblyLoad += new AssemblyLoadEventHandler(this.AppDomain_AssemblyLoad); }
private IProject FindXapSourceProject(IProject targetProject, out DocumentReference xapDeploymentDirectory) { xapDeploymentDirectory = (DocumentReference)null; IProject project = (IProject)null; if (targetProject is SilverlightProject && targetProject.GetCapability <bool>("CanBeStartupProject")) { project = targetProject; if (project.FullTargetPath != null) { xapDeploymentDirectory = DocumentReference.Create(PathHelper.GetDirectoryNameOrRoot(project.FullTargetPath)); } } else { ISolution currentSolution = ServiceExtensions.ProjectManager(this.serviceProvider).CurrentSolution; IProjectOutputReferenceResolver referenceResolver = currentSolution as IProjectOutputReferenceResolver; if (currentSolution != null && referenceResolver != null) { foreach (IProject sourceProject in currentSolution.Projects) { Uri deploymentResolvedRoot = referenceResolver.GetDeploymentResolvedRoot(sourceProject); if (deploymentResolvedRoot != (Uri)null) { DocumentReference documentReference = DocumentReference.Create(deploymentResolvedRoot.LocalPath); if (documentReference.Path.StartsWith(targetProject.ProjectRoot.Path, StringComparison.OrdinalIgnoreCase)) { xapDeploymentDirectory = documentReference; project = sourceProject; break; } } } } } return(project); }
protected virtual long GetLargeImageThreshold() { return((long)((double)ServiceExtensions.ProjectManager(this.serviceProvider).OptionsModel.LargeImageWarningThreshold *Math.Pow(2.0, 10.0))); }
private IConfigurationObject GetSettingsObject() { return(ServiceExtensions.ProjectManager(this.serviceProvider).CurrentSolution.SolutionSettingsManager.SolutionSettings); }
private static int GetLargeImageThreshold(IServiceProvider services) { return(ServiceExtensions.ProjectManager(services).OptionsModel.LargeImageWarningThreshold); }