vault backup: 2025-06-23 00:01:29

This commit is contained in:
2025-06-23 00:01:29 +03:30
parent a7f5370340
commit 8e7ad789fb
1347 changed files with 0 additions and 229 deletions
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BC5774AA-BBB0-4474-ADE6-00C748D812A9}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>DIP_Solution05</RootNamespace>
<AssemblyName>DIP_Solution05</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ExternalService\Service01.cs" />
<Compile Include="ExternalService\Service02.cs" />
<Compile Include="ExternalService\Service03.cs" />
<Compile Include="Framework\Base\BaseService.cs" />
<Compile Include="Framework\Interface\IService.cs" />
<Compile Include="LifeCycle\A.cs" />
<Compile Include="LifeCycle\B.cs" />
<Compile Include="LifeCycle\C.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.ExternalService
{
public class Service01: Framework.Base.BaseService
{
#region [ - Ctor - ]
public Service01()
{
}
#endregion
#region [ - Method - ]
#region [ - M1() - ]
public override void M1()
{
Console.WriteLine("M1 is running ...");
}
#endregion
#endregion
}
}
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.ExternalService
{
public class Service02: Framework.Base.BaseService
{
#region [ - Ctor - ]
public Service02()
{
}
#endregion
#region [ - Method - ]
#region [ - M2() - ]
public override void M2()
{
Console.WriteLine("M2 is running ...");
}
#endregion
#endregion
}
}
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.ExternalService
{
public class Service03 : Framework.Base.BaseService
{
#region [ - Ctor - ]
public Service03()
{
}
#endregion
#region [ - Method - ]
#region [ - M3() - ]
public override void M3()
{
Console.WriteLine("M3 is running ...");
}
#endregion
#endregion
}
}
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.Framework.Base
{
public class BaseService : Interface.IService
{
#region [ - Ctor - ]
public BaseService()
{
}
#endregion
#region [ - Methods - ]
#region [ - M1() - ]
public virtual void M1()
{
throw new NotImplementedException();
}
#endregion
#region [ - M2() - ]
public virtual void M2()
{
throw new NotImplementedException();
}
#endregion
#region [ - M3() - ]
public virtual void M3()
{
throw new NotImplementedException();
}
#endregion
#endregion
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.Framework.Interface
{
public interface IService
{
#region [ - Methods - ]
void M1();
void M2();
void M3();
#endregion
}
}
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.LifeCycle
{
public class A
{
#region [ - Ctor - ]
#region [ - A(Framework.Interface.IService ref_IService) - ]
// Eager Aggregation
public A(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#region [ - A() - ]
public A()
{
}
#endregion
#endregion
#region [ - Prop - ]
public Framework.Interface.IService Ref_IService { get; set; }
#endregion
#region [ - Method - ]
#region [ - InitializeIServiceRefrence(Framework.Interface.IService ref_IService) - ]
// Lazy Aggregation
public void InitializeIServiceRefrence(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#endregion
}
}
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.LifeCycle
{
public class B
{
#region [ - Ctor - ]
#region [ - B(Framework.Interface.IService ref_IService) - ]
// Eager Aggregation
public B(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#region [ - A() - ]
public B()
{
}
#endregion
#endregion
#region [ - Prop - ]
public Framework.Interface.IService Ref_IService { get; set; }
#endregion
#region [ - Method - ]
#region [ - InitializeIServiceRefrence(Framework.Interface.IService ref_IService) - ]
// Lazy Aggregation
public void InitializeIServiceRefrence(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#endregion
}
}
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05.LifeCycle
{
public class C
{
#region [ - Ctor - ]
#region [ - C(Framework.Interface.IService ref_IService) - ]
// Eager Aggregation
public C(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#region [ - C() - ]
public C()
{
}
#endregion
#endregion
#region [ - Prop - ]
public Framework.Interface.IService Ref_IService { get; set; }
#endregion
#region [ - Method - ]
#region [ - InitializeIServiceRefrence(Framework.Interface.IService ref_IService) - ]
// Lazy Aggregation
public void InitializeIServiceRefrence(Framework.Interface.IService ref_IService)
{
Ref_IService = ref_IService;
}
#endregion
#endregion
}
}
@@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution05
{
class Program
{
static void Main(string[] args)
{
#region [ - Eager Aggregation - ]
Console.WriteLine("| Eager Aggregation :");
#region [ - A - ]
Console.WriteLine("A:");
LifeCycle.A Ref_A_1 = new LifeCycle.A(new ExternalService.Service01()); // LSP
Ref_A_1.Ref_IService.M1();
LifeCycle.A Ref_A_2 = new LifeCycle.A(new ExternalService.Service02());
Ref_A_2.Ref_IService.M2();
LifeCycle.A Ref_A_3 = new LifeCycle.A(new ExternalService.Service03());
Ref_A_3.Ref_IService.M3();
#endregion
Console.WriteLine("--------------");
#region [ - B - ]
Console.WriteLine("B:");
LifeCycle.B Ref_B_1 = new LifeCycle.B(new ExternalService.Service01());
Ref_B_1.Ref_IService.M1();
LifeCycle.B Ref_B_2 = new LifeCycle.B(new ExternalService.Service02());
Ref_B_2.Ref_IService.M2();
LifeCycle.B Ref_B_3 = new LifeCycle.B(new ExternalService.Service03());
Ref_B_3.Ref_IService.M3();
#endregion
Console.WriteLine("--------------");
#region [ - C - ]
Console.WriteLine("C:");
LifeCycle.C Ref_C_1 = new LifeCycle.C(new ExternalService.Service01());
Ref_C_1.Ref_IService.M1();
LifeCycle.C Ref_C_2 = new LifeCycle.C(new ExternalService.Service02());
Ref_C_2.Ref_IService.M2();
LifeCycle.C Ref_C_3 = new LifeCycle.C(new ExternalService.Service03());
Ref_C_3.Ref_IService.M3();
#endregion
#endregion
Console.WriteLine("----------------------------");
#region [ - Lazy Aggregation - ]
Console.WriteLine("| Lazy Aggregation :");
#region [ - A - ]
Console.WriteLine("A:");
LifeCycle.A Ref_A_4 = new LifeCycle.A();
Ref_A_4.InitializeIServiceRefrence(new ExternalService.Service01());
Ref_A_4.Ref_IService.M1();
LifeCycle.A Ref_A_5 = new LifeCycle.A();
Ref_A_5.InitializeIServiceRefrence(new ExternalService.Service02());
Ref_A_5.Ref_IService.M2();
LifeCycle.A Ref_A_6 = new LifeCycle.A();
Ref_A_6.InitializeIServiceRefrence(new ExternalService.Service03());
Ref_A_6.Ref_IService.M3();
#endregion
Console.WriteLine("--------------");
#region [ - B - ]
Console.WriteLine("B:");
LifeCycle.B Ref_B_4 = new LifeCycle.B();
Ref_B_4.InitializeIServiceRefrence(new ExternalService.Service01());
Ref_B_4.Ref_IService.M1();
LifeCycle.B Ref_B_5 = new LifeCycle.B();
Ref_B_5.InitializeIServiceRefrence(new ExternalService.Service02());
Ref_B_5.Ref_IService.M2();
LifeCycle.B Ref_B_6 = new LifeCycle.B();
Ref_B_6.InitializeIServiceRefrence(new ExternalService.Service03());
Ref_B_6.Ref_IService.M3();
#endregion
Console.WriteLine("--------------");
#region [ - C - ]
Console.WriteLine("C:");
LifeCycle.C Ref_C_4 = new LifeCycle.C();
Ref_C_4.InitializeIServiceRefrence(new ExternalService.Service01());
Ref_C_4.Ref_IService.M1();
LifeCycle.C Ref_C_5 = new LifeCycle.C();
Ref_C_5.InitializeIServiceRefrence(new ExternalService.Service02());
Ref_C_5.Ref_IService.M2();
LifeCycle.C Ref_C_6 = new LifeCycle.C();
Ref_C_6.InitializeIServiceRefrence(new ExternalService.Service03());
Ref_C_6.Ref_IService.M3();
#endregion
#endregion
Console.ReadLine();
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DIP_Solution05")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DIP_Solution05")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("bc5774aa-bbb0-4474-ade6-00c748d812a9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
@@ -0,0 +1 @@
14a82008596b4dfd9c417b67514f5c76a7e975ef
@@ -0,0 +1,14 @@
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.exe.config
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.pdb
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.pdb
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.exe.config
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.exe
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\bin\Debug\DIP_Solution05.pdb
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.exe
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution05\obj\Debug\DIP_Solution05.pdb