vault backup: 2025-06-22 11:02:30
This commit is contained in:
@@ -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,61 @@
|
||||
<?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>{242554DD-3668-4227-B663-EAA6A6CF5A53}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>DIP_Solution03</RootNamespace>
|
||||
<AssemblyName>DIP_Solution03</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="LifeCycle\A.cs" />
|
||||
<Compile Include="LifeCycle\B.cs" />
|
||||
<Compile Include="LifeCycle\C.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Service.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.ExternalService
|
||||
{
|
||||
public class Service01
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public Service01()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [ - Method - ]
|
||||
public void M1()
|
||||
{
|
||||
Console.WriteLine("M1 is running ...");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.ExternalService
|
||||
{
|
||||
public class Service02
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public Service02()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [ - Method - ]
|
||||
public void M2()
|
||||
{
|
||||
Console.WriteLine("M2 is running ...");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.ExternalService
|
||||
{
|
||||
public class Service03
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public Service03()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [ - Method - ]
|
||||
public void M3()
|
||||
{
|
||||
Console.WriteLine("M3 is running ...");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.LifeCycle
|
||||
{
|
||||
public class A: Service
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public A(): base(new ExternalService.Service01(), new ExternalService.Service02(), new ExternalService.Service03())
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.LifeCycle
|
||||
{
|
||||
public class B: Service
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public B() : base(new ExternalService.Service01(), new ExternalService.Service02(), new ExternalService.Service03())
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03.LifeCycle
|
||||
{
|
||||
public class C: Service
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
public C() : base(new ExternalService.Service01(), new ExternalService.Service02(), new ExternalService.Service03())
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
LifeCycle.A Ref_A = new LifeCycle.A();
|
||||
|
||||
LifeCycle.B Ref_B = new LifeCycle.B();
|
||||
|
||||
LifeCycle.C Ref_C = new LifeCycle.C();
|
||||
|
||||
|
||||
// Active
|
||||
|
||||
#region [ - Eager Aggregation - ]
|
||||
|
||||
Console.WriteLine("A:");
|
||||
Ref_A.Ref_Service01.M1();
|
||||
Ref_A.Ref_Service02.M2();
|
||||
Ref_A.Ref_Service03.M3();
|
||||
|
||||
Console.WriteLine("--------------");
|
||||
|
||||
Console.WriteLine("B:");
|
||||
Ref_B.Ref_Service01.M1();
|
||||
Ref_B.Ref_Service02.M2();
|
||||
Ref_B.Ref_Service03.M3();
|
||||
|
||||
Console.WriteLine("--------------");
|
||||
|
||||
Console.WriteLine("C:");
|
||||
Ref_C.Ref_Service01.M1();
|
||||
Ref_C.Ref_Service02.M2();
|
||||
Ref_C.Ref_Service03.M3();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// Disable : Aggregation methods in Serveice are commented
|
||||
|
||||
#region [ - Lazy Aggregation - ]
|
||||
|
||||
//#region [ - A - ]
|
||||
|
||||
//Console.WriteLine("A:");
|
||||
|
||||
//Ref_A.InitializeService01Refrence(new ExternalService.Service01());
|
||||
//Ref_A.Ref_Service01.M1();
|
||||
|
||||
//Ref_A.InitializeService02Refrence(new ExternalService.Service02());
|
||||
//Ref_A.Ref_Service02.M2();
|
||||
|
||||
//Ref_A.InitializeService03Refrence(new ExternalService.Service03());
|
||||
//Ref_A.Ref_Service03.M3();
|
||||
|
||||
//#endregion
|
||||
|
||||
//Console.WriteLine("--------------");
|
||||
|
||||
//#region [ - B - ]
|
||||
|
||||
//Console.WriteLine("B:");
|
||||
|
||||
//Ref_B.InitializeService01Refrence(new ExternalService.Service01());
|
||||
//Ref_B.Ref_Service01.M1();
|
||||
|
||||
//Ref_B.InitializeService02Refrence(new ExternalService.Service02());
|
||||
//Ref_B.Ref_Service02.M2();
|
||||
|
||||
//Ref_B.InitializeService03Refrence(new ExternalService.Service03());
|
||||
//Ref_B.Ref_Service03.M3();
|
||||
|
||||
//#endregion
|
||||
|
||||
//Console.WriteLine("--------------");
|
||||
|
||||
//#region [ - C - ]
|
||||
|
||||
//Console.WriteLine("C:");
|
||||
|
||||
//Ref_C.InitializeService01Refrence(new ExternalService.Service01());
|
||||
//Ref_C.Ref_Service01.M1();
|
||||
|
||||
//Ref_C.InitializeService02Refrence(new ExternalService.Service02());
|
||||
//Ref_C.Ref_Service02.M2();
|
||||
|
||||
//Ref_C.InitializeService03Refrence(new ExternalService.Service03());
|
||||
//Ref_C.Ref_Service03.M3();
|
||||
|
||||
//#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
System.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_Solution03")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DIP_Solution03")]
|
||||
[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("242554dd-3668-4227-b663-eaa6a6cf5a53")]
|
||||
|
||||
// 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,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DIP_Solution03
|
||||
{
|
||||
public class Service
|
||||
{
|
||||
#region [ - Ctor - ]
|
||||
|
||||
#region [ - Service(ExternalService.Service01 ref_Service01, ExternalService.Service02 ref_Service02, ExternalService.Service03 ref_Service03) - ]
|
||||
|
||||
// Eager Aggregation
|
||||
|
||||
public Service(ExternalService.Service01 ref_Service01,
|
||||
ExternalService.Service02 ref_Service02,
|
||||
ExternalService.Service03 ref_Service03)
|
||||
{
|
||||
Ref_Service01 = ref_Service01;
|
||||
Ref_Service02 = ref_Service02;
|
||||
Ref_Service03 = ref_Service03;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ - Service() - ]
|
||||
|
||||
public Service()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region [ - Props - ]
|
||||
public ExternalService.Service01 Ref_Service01 { get; set; }
|
||||
public ExternalService.Service02 Ref_Service02 { get; set; }
|
||||
public ExternalService.Service03 Ref_Service03 { get; set; }
|
||||
#endregion
|
||||
|
||||
#region [ - Methods - ]
|
||||
|
||||
////Lazy Aggregation:
|
||||
|
||||
//#region [ - InitializeService01Refrence(ExternalService.Service01 ref_Service01) - ]
|
||||
|
||||
//public void InitializeService01Refrence(ExternalService.Service01 ref_Service01)
|
||||
//{
|
||||
// Ref_Service01 = ref_Service01;
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
//#region [ - InitializeService02Refrence(ExternalService.Service02 ref_Service02) - ]
|
||||
//public void InitializeService02Refrence(ExternalService.Service02 ref_Service02)
|
||||
//{
|
||||
// Ref_Service02 = ref_Service02;
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
//#region [ - InitializeService03Refrence(ExternalService.Service03 ref_Service03) - ]
|
||||
//public void InitializeService03Refrence(ExternalService.Service03 ref_Service03)
|
||||
//{
|
||||
// Ref_Service03 = ref_Service03;
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
+6
@@ -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>
|
||||
BIN
Binary file not shown.
+4
@@ -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")]
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
cea1fc0e6df5af2bbcaf0de8940de2f746904f4c
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\bin\Debug\DIP_Solution03.exe.config
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\bin\Debug\DIP_Solution03.exe
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\bin\Debug\DIP_Solution03.pdb
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\obj\Debug\DIP_Solution03.csproj.AssemblyReference.cache
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\obj\Debug\DIP_Solution03.csproj.CoreCompileInputs.cache
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\obj\Debug\DIP_Solution03.exe
|
||||
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution03\obj\Debug\DIP_Solution03.pdb
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user