-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from dansiegel/prism8-releasecandidate
Prism 8 - Updates
- Loading branch information
Showing
38 changed files
with
162 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/Prism.Container.Extensions/Internals/ContainerExtensionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using Prism.Ioc; | ||
|
||
namespace Prism.Container.Extensions.Internals | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] | ||
public abstract class ContainerExtensionAttribute : Attribute | ||
{ | ||
public IContainerExtension GetContainer() | ||
{ | ||
var container = Init(); | ||
ContainerLocator.SetContainerExtension(() => container); | ||
return ContainerLocator.Current; | ||
} | ||
|
||
protected abstract IContainerExtension Init(); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/Prism.Container.Extensions/Internals/ContainerLocationHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using System.Reflection; | ||
using Prism.Ioc; | ||
|
||
namespace Prism.Container.Extensions.Internals | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public static class ContainerLocationHelper | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public static IContainerExtension LocateContainer(IContainerExtension container = null) | ||
{ | ||
if(container != null) | ||
{ | ||
ContainerLocator.SetContainerExtension(() => container); | ||
} | ||
|
||
var located = ContainerLocator.Current; | ||
if (located != null) | ||
return located; | ||
|
||
var entryAssembly = Assembly.GetEntryAssembly(); | ||
var containerExtensionAttribute = entryAssembly.GetCustomAttributes().OfType<ContainerExtensionAttribute>().FirstOrDefault(); | ||
return containerExtensionAttribute?.GetContainer(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Prism.DryIoc.Extensions/Internals/PrismContainerExtensionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using Prism.Container.Extensions.Internals; | ||
using Prism.Ioc; | ||
|
||
namespace Prism.DryIoc.Internals | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] | ||
public sealed class PrismContainerExtensionAttribute : ContainerExtensionAttribute | ||
{ | ||
protected override IContainerExtension Init() => PrismContainerExtension.Init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/Prism.DryIoc.Extensions/build/PreserveContainerExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using Prism.DryIoc; | ||
using Prism.DryIoc.Internals; | ||
|
||
// Force the assembly into the App Domain | ||
[assembly: Preserve(typeof(global::Prism.DryIoc.PrismContainerExtension))] | ||
[assembly: Preserve(typeof(global::DryIoc.Container))] | ||
[assembly: PrismContainerExtension] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
using Prism.AppModel; | ||
using Prism.Mvvm; | ||
using Prism.Mvvm; | ||
using Prism.Navigation; | ||
|
||
namespace Prism.Forms.Extended.ViewModels | ||
{ | ||
internal class DefaultViewModel : BindableBase, IAutoInitialize | ||
internal class DefaultViewModel : BindableBase, IInitialize | ||
{ | ||
private string _title; | ||
public string Title | ||
{ | ||
get => _title; | ||
set => SetProperty(ref _title, value); | ||
} | ||
|
||
public void Initialize(INavigationParameters parameters) | ||
{ | ||
if(parameters.TryGetValue("Title", out string title) || | ||
parameters.TryGetValue("title", out title)) | ||
{ | ||
Title = title; | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...sm.Microsoft.DependencyInjection.Extensions/Internals/PrismContainerExtensionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using Prism.Container.Extensions.Internals; | ||
using Prism.Ioc; | ||
|
||
namespace Prism.Microsoft.DependencyInjection.Internals | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] | ||
public sealed class PrismContainerExtensionAttribute : ContainerExtensionAttribute | ||
{ | ||
protected override IContainerExtension Init() => PrismContainerExtension.Init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
src/Prism.Microsoft.DependencyInjection.Extensions/build/PreserveContainerExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
using Prism.Microsoft.DependencyInjection; | ||
using Prism.Microsoft.DependencyInjection.Internals; | ||
|
||
// Force the assembly into the App Domain | ||
[assembly: Preserve(typeof(global::Prism.Microsoft.DependencyInjection.PrismContainerExtension))] | ||
[assembly: Preserve(typeof(global::Microsoft.Extensions.DependencyInjection.ServiceCollection))] | ||
[assembly: Preserve(typeof(global::Microsoft.Extensions.DependencyInjection.ServiceProvider))] | ||
[assembly: PrismContainerExtension] |
14 changes: 14 additions & 0 deletions
14
src/Prism.Unity.Extensions/Internals/PrismContainerExtensionAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using Prism.Container.Extensions.Internals; | ||
using Prism.Ioc; | ||
|
||
namespace Prism.Unity.Internals | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] | ||
public sealed class PrismContainerExtensionAttribute : ContainerExtensionAttribute | ||
{ | ||
protected override IContainerExtension Init() => PrismContainerExtension.Init(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/Prism.Unity.Extensions/build/PreserveContainerExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using Prism.Unity; | ||
using Prism.Unity.Internals; | ||
|
||
// Force the assembly into the App Domain | ||
[assembly: Preserve(typeof(global::Prism.Unity.PrismContainerExtension))] | ||
[assembly: Preserve(typeof(global::Unity.UnityContainer))] | ||
[assembly: PrismContainerExtension] |
52 changes: 0 additions & 52 deletions
52
src/Shiny.Prism/Modularity/IContainerRegistryAutoLoadExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.