Skip to content

Commit

Permalink
Merge pull request #27 from Oscallo/dev
Browse files Browse the repository at this point in the history
Убрана зависимость от windows.
  • Loading branch information
Oscallo authored Jul 25, 2024
2 parents 455598b + 3fd8884 commit 94794cb
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 106 deletions.
1 change: 1 addition & 0 deletions src/Oscallo.Castle.AddonedKernel.Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using System.Collections.Generic;
using System.Reflection;
using System.Windows;
using Oscallo.Castle.AddonedKernel.IntegrableInterfaces;

namespace Oscallo.Castle.AddonedKernel.Demo
{
Expand Down
16 changes: 0 additions & 16 deletions src/Oscallo.Castle.AddonedKernel.Demo/DI/Injector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

using Oscallo.Castle.AddonedKernel.Demo.Services;
using Oscallo.Castle.AddonedKernel.Integrators;
using Oscallo.Castle.AddonedKernel.LifeCyrcle;
using Castle.MicroKernel;
using Castle.MicroKernel.Registration;
using Castle.Windsor;
Expand Down Expand Up @@ -81,16 +80,6 @@ public bool HasComponent<T>()
return false;
}

void IExiteable.OnExit(ExitEventArgs e) => Dispose();

void IStartupable.OnStartup(StartupEventArgs e)
{
if (e.Args.Length != 0)
{
throw new NotImplementedException("Need override method");
}
}

void IRegistrar.Register(params IRegistration[] registrations)
{
foreach (IRegistration item in registrations)
Expand Down Expand Up @@ -119,10 +108,5 @@ public virtual void Dispose()
{
((IDisposable)this).Dispose();
}

public virtual void OnStartup(StartupEventArgs e)
{
((IStartupable)this).OnStartup(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

using Oscallo.Castle.AddonedKernel.Integrators;
using Castle.MicroKernel.Registration;
using Oscallo.Castle.AddonedKernel.IntegrableInterfaces;

namespace Oscallo.Castle.AddonedKernel.Demo.IntegrableClasses
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

using Oscallo.Castle.AddonedKernel.Integrators;
using Castle.MicroKernel.Registration;
using Oscallo.Castle.AddonedKernel.IntegrableInterfaces;

namespace Oscallo.Castle.AddonedKernel.Demo.IntegrableClasses
{
Expand Down
2 changes: 1 addition & 1 deletion src/Oscallo.Castle.AddonedKernel.Demo/MVVM/IMainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

using Oscallo.Castle.AddonedKernel.Integrators;
using Oscallo.Castle.AddonedKernel.IntegrableInterfaces;

namespace Oscallo.Castle.AddonedKernel.Demo.MVVM
{
Expand Down
1 change: 1 addition & 0 deletions src/Oscallo.Castle.AddonedKernel.Demo/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Castle.MicroKernel.Registration;
using Oscallo.Castle.AddonedKernel.Demo.MVVM;
using Oscallo.Castle.AddonedKernel.Demo.Services;
using Oscallo.Castle.AddonedKernel.IntegrableInterfaces;
using Oscallo.Castle.AddonedKernel.Integrators;
using System.Windows;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
* limitations under the License.
*/

namespace Oscallo.Castle.AddonedKernel.Integrators
using Oscallo.Castle.AddonedKernel.Integrators;

namespace Oscallo.Castle.AddonedKernel.IntegrableInterfaces
{
/// <summary>
/// Контракт, гарантирующий создание метода регистрации зависисмостей
/// </summary>
public interface IIntegrator
{
{
/// <summary>
/// Регистрация зависимостей
/// </summary>
/// <param name="injector">Сущность, имеющая возможность регистрировать зависимости</param>
public void Integrate(IRegistrar injector);
}
public void Integrate(IRegistrar injector);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* limitations under the License.
*/

using Oscallo.Castle.AddonedKernel.LifeCyrcle;
using Castle.Windsor;
using System;

Expand All @@ -22,7 +21,7 @@ namespace Oscallo.Castle.AddonedKernel.Integrators
/// <summary>
/// Контракт, гарантирующий добавление и удаление дочернего контейнера
/// </summary>
public interface IContainerRegistrar : ILifeCyrcleSupport, IDisposable
public interface IContainerRegistrar : IDisposable
{
void AddChildContainer(IWindsorContainer windsorContainer);

Expand Down
3 changes: 1 addition & 2 deletions src/Oscallo.Castle.AddonedKernel/Integrators/IRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* limitations under the License.
*/

using Oscallo.Castle.AddonedKernel.LifeCyrcle;
using Castle.MicroKernel;
using Castle.MicroKernel.Registration;
using System;
Expand All @@ -23,7 +22,7 @@ namespace Oscallo.Castle.AddonedKernel.Integrators
/// <summary>
/// Контракт, гарантирующий, что сущность будет иметь функцмонал регистрации зависимостей
/// </summary>
public interface IRegistrar : ILifeCyrcleSupport, IDisposable
public interface IRegistrar : IDisposable
{
/// <summary>
/// Регистрация
Expand Down
3 changes: 1 addition & 2 deletions src/Oscallo.Castle.AddonedKernel/Integrators/IResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
* limitations under the License.
*/

using Oscallo.Castle.AddonedKernel.LifeCyrcle;
using Castle.MicroKernel;
using System;

namespace Oscallo.Castle.AddonedKernel.Integrators
{
public interface IResolver : ILifeCyrcleSupport, IDisposable
public interface IResolver : IDisposable
{
/// <summary>
/// Проверка компонента на наличие в списке зарегистрированных
Expand Down
27 changes: 0 additions & 27 deletions src/Oscallo.Castle.AddonedKernel/LifeCycle/IExiteable.cs

This file was deleted.

22 changes: 0 additions & 22 deletions src/Oscallo.Castle.AddonedKernel/LifeCycle/ILifeCyrcleSupport.cs

This file was deleted.

27 changes: 0 additions & 27 deletions src/Oscallo.Castle.AddonedKernel/LifeCycle/IStartupable.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<Company>Oscallo</Company>
<Version>0.9.0</Version>
<Version>0.9.01</Version>
<Title>Oscallo.Castle.AddonedKernel</Title>
<RepositoryUrl>https://github.com/Oscallo/Castle.AddonedKernel</RepositoryUrl>
<PackageTags>castle-windsor, window</PackageTags>
Expand Down

0 comments on commit 94794cb

Please sign in to comment.