Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module updates #1509

Merged
merged 9 commits into from
Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<PackageTags Condition=" '$(IsFormsProject)' == 'True' ">prism;mvvm;uwp;android;ios;xamarin;xamarin.forms;dependency injection;di</PackageTags>
<IS_PREVIEW Condition=" '$(IS_PREVIEW)' == '' ">false</IS_PREVIEW>
<IS_RELEASE Condition=" '$(IS_RELEASE)' == '' ">false</IS_RELEASE>
<ExtrasEnableWpfProjectSetup>$(IsWpfProject)</ExtrasEnableWpfProjectSetup>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down
6 changes: 3 additions & 3 deletions Source/Prism.Tests/Prism.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions Source/Prism/Modularity/IModuleInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Collections.ObjectModel;

namespace Prism.Modularity
{
public interface IModuleInfo : IModuleCatalogItem
{
Collection<string> DependsOn { get; set; }
InitializationMode InitializationMode { get; set; }
string ModuleName { get; set; }
string ModuleType { get; set; }
string Ref { get; set; }
ModuleState State { get; set; }
}
}
2 changes: 1 addition & 1 deletion Source/Prism/Modularity/IModuleInitializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public interface IModuleInitializer
/// Initializes the specified module.
/// </summary>
/// <param name="moduleInfo">The module to initialize</param>
void Initialize(ModuleInfo moduleInfo);
void Initialize(IModuleInfo moduleInfo);
}
}
4 changes: 2 additions & 2 deletions Source/Prism/Modularity/LoadModuleCompletedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class LoadModuleCompletedEventArgs : EventArgs
/// </summary>
/// <param name="moduleInfo">The module info.</param>
/// <param name="error">Any error that occurred during the call.</param>
public LoadModuleCompletedEventArgs(ModuleInfo moduleInfo, Exception error)
public LoadModuleCompletedEventArgs(IModuleInfo moduleInfo, Exception error)
{
if (moduleInfo == null)
{
Expand All @@ -29,7 +29,7 @@ public LoadModuleCompletedEventArgs(ModuleInfo moduleInfo, Exception error)
/// Gets the module info.
/// </summary>
/// <value>The module info.</value>
public ModuleInfo ModuleInfo { get; private set; }
public IModuleInfo ModuleInfo { get; private set; }

/// <summary>
/// Gets any error that occurred
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


using System;

namespace Prism.Modularity
Expand All @@ -10,24 +8,20 @@ namespace Prism.Modularity
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ModuleDependencyAttribute : Attribute
{
private readonly string _moduleName;

/// <summary>
/// Initializes a new instance of <see cref="ModuleDependencyAttribute"/>.
/// </summary>
/// <param name="moduleName">The name of the module that this module is dependant upon.</param>
public ModuleDependencyAttribute(string moduleName)
{
_moduleName = moduleName;
ModuleName = moduleName;
}

/// <summary>
/// Gets the name of the module that this module is dependant upon.
/// </summary>
/// <value>The name of the module that this module is dependant upon.</value>
public string ModuleName
{
get { return _moduleName; }
}
public string ModuleName { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ModuleDownloadProgressChangedEventArgs : ProgressChangedEventArgs
/// <param name="moduleInfo">The module info.</param>
/// <param name="bytesReceived">The bytes received.</param>
/// <param name="totalBytesToReceive">The total bytes to receive.</param>
public ModuleDownloadProgressChangedEventArgs(ModuleInfo moduleInfo, long bytesReceived, long totalBytesToReceive)
public ModuleDownloadProgressChangedEventArgs(IModuleInfo moduleInfo, long bytesReceived, long totalBytesToReceive)
: base(CalculateProgressPercentage(bytesReceived, totalBytesToReceive), null)
{
if (moduleInfo == null)
Expand All @@ -31,7 +31,7 @@ public ModuleDownloadProgressChangedEventArgs(ModuleInfo moduleInfo, long bytesR
/// Getsthe module info.
/// </summary>
/// <value>The module info.</value>
public ModuleInfo ModuleInfo { get; private set; }
public IModuleInfo ModuleInfo { get; private set; }

/// <summary>
/// Gets the bytes received.
Expand Down
Loading