vault backup: 2025-06-22 11:02:30

This commit is contained in:
2025-06-22 11:02:30 +03:30
parent 9c7c55a6a2
commit a7f5370340
189 changed files with 1475 additions and 797 deletions
@@ -0,0 +1,88 @@
{
"Version": 1,
"WorkspaceRootPath": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|e:\\ali\\programming\\asp.net\\mft\\projects\\h\\session07\\session07\\session07\\dip_solution04\\framework\\interface\\iservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|solutionrelative:dip_solution04\\framework\\interface\\iservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|e:\\ali\\programming\\asp.net\\mft\\projects\\h\\session07\\session07\\session07\\dip_solution04\\framework\\base\\baseservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|solutionrelative:dip_solution04\\framework\\base\\baseservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|e:\\ali\\programming\\asp.net\\mft\\projects\\h\\session07\\session07\\session07\\dip_solution04\\lifecycle\\a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|solutionrelative:dip_solution04\\lifecycle\\a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|e:\\ali\\programming\\asp.net\\mft\\projects\\h\\session07\\session07\\session07\\dip_solution04\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}|DIP_Solution04\\DIP_Solution04.csproj|solutionrelative:dip_solution04\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Program.cs",
"DocumentMoniker": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Program.cs",
"RelativeDocumentMoniker": "DIP_Solution04\\Program.cs",
"ToolTip": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Program.cs",
"RelativeToolTip": "DIP_Solution04\\Program.cs",
"ViewState": "AQIAAAYAAAAAAAAAAAAAABoAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-24T11:21:29.832Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "A.cs",
"DocumentMoniker": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\LifeCycle\\A.cs",
"RelativeDocumentMoniker": "DIP_Solution04\\LifeCycle\\A.cs",
"ToolTip": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\LifeCycle\\A.cs",
"RelativeToolTip": "DIP_Solution04\\LifeCycle\\A.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAkAAAAFAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-24T11:20:14.812Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "BaseService.cs",
"DocumentMoniker": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Framework\\Base\\BaseService.cs",
"RelativeDocumentMoniker": "DIP_Solution04\\Framework\\Base\\BaseService.cs",
"ToolTip": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Framework\\Base\\BaseService.cs",
"RelativeToolTip": "DIP_Solution04\\Framework\\Base\\BaseService.cs",
"ViewState": "AQIAAAgAAAAAAAAAAAAAAAoAAAAFAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-24T11:18:54.027Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "IService.cs",
"DocumentMoniker": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Framework\\Interface\\IService.cs",
"RelativeDocumentMoniker": "DIP_Solution04\\Framework\\Interface\\IService.cs",
"ToolTip": "E:\\Ali\\Programming\\ASP.net\\MFT\\Projects\\H\\Session07\\Session07\\Session07\\DIP_Solution04\\Framework\\Interface\\IService.cs",
"RelativeToolTip": "DIP_Solution04\\Framework\\Interface\\IService.cs",
"ViewState": "AQIAAAgAAAAAAAAAAAAAAAsAAAAoAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-24T11:17:34.805Z",
"EditorCaption": ""
}
]
}
]
}
]
}
@@ -0,0 +1,87 @@
{
"Version": 1,
"WorkspaceRootPath": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|e:\\theorder\\ali_session07\\session07\\session07\\dip_solution05\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|solutionrelative:dip_solution05\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|e:\\theorder\\ali_session07\\session07\\session07\\dip_solution05\\externalservice\\service01.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|solutionrelative:dip_solution05\\externalservice\\service01.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|e:\\theorder\\ali_session07\\session07\\session07\\dip_solution05\\lifecycle\\a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{BC5774AA-BBB0-4474-ADE6-00C748D812A9}|DIP_Solution05\\DIP_Solution05.csproj|solutionrelative:dip_solution05\\lifecycle\\a.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 4,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}"
},
{
"$type": "Bookmark",
"Name": "ST:1:0:{e8b06f52-6d01-11d2-aa7d-00c04f990343}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Program.cs",
"DocumentMoniker": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\Program.cs",
"RelativeDocumentMoniker": "DIP_Solution05\\Program.cs",
"ToolTip": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\Program.cs",
"RelativeToolTip": "DIP_Solution05\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAAWAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-02-12T14:46:14.368Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "A.cs",
"DocumentMoniker": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\LifeCycle\\A.cs",
"RelativeDocumentMoniker": "DIP_Solution05\\LifeCycle\\A.cs",
"ToolTip": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\LifeCycle\\A.cs",
"RelativeToolTip": "DIP_Solution05\\LifeCycle\\A.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACgAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-02-12T13:38:51.898Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "Service01.cs",
"DocumentMoniker": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\ExternalService\\Service01.cs",
"RelativeDocumentMoniker": "DIP_Solution05\\ExternalService\\Service01.cs",
"ToolTip": "E:\\TheOrder\\ALI_Session07\\Session07\\Session07\\DIP_Solution05\\ExternalService\\Service01.cs",
"RelativeToolTip": "DIP_Solution05\\ExternalService\\Service01.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-02-12T12:47:52.844Z",
"EditorCaption": ""
}
]
}
]
}
]
}
@@ -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,60 @@
<?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>{0486B1D9-EAFD-4449-B375-BCD2F2819933}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>DIP_Solution01</RootNamespace>
<AssemblyName>DIP_Solution01</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" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.ExternalService
{
public class Service01
{
#region [ - Ctor - ]
public Service01()
{
}
#endregion
#region [ - Method - ]
public void M1()
{
Console.WriteLine("M1 is running ...");
}
#endregion
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.ExternalService
{
public class Service02
{
#region [ - Ctor - ]
public Service02()
{
}
#endregion
#region [ - Method - ]
public void M2()
{
Console.WriteLine("M2 is running ...");
}
#endregion
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.ExternalService
{
public class Service03
{
#region [ - Ctor - ]
public Service03()
{
}
#endregion
#region [ - Method - ]
public void M3()
{
Console.WriteLine("M3 is running ...");
}
#endregion
}
}
@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.LifeCycle
{
public class A
{
#region [ - Ctor - ]
public A(ExternalService.Service01 service01,
ExternalService.Service02 service02,
ExternalService.Service03 service03)
{
//Eager Composition
//Ref_Service01 = new ExternalService.Service01();
//Ref_Service02 = new ExternalService.Service02();
//Ref_Service03 = new ExternalService.Service03();
//Eager Aggregation
Ref_Service01 = service01;
Ref_Service02 = service02;
Ref_Service03 = service03;
}
#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 Composition:
//#region [ - InitializeService01Refrence() - ]
//public void InitializeService01Refrence()
//{
// Ref_Service01 = new ExternalService.Service01();
//}
//#endregion
//#region [ - InitializeService02Refrence() - ]
//public void InitializeService02Refrence()
//{
// Ref_Service02 = new ExternalService.Service02();
//}
//#endregion
//#region [ - InitializeService03Refrence() - ]
//public void InitializeService03Refrence()
//{
// Ref_Service03 = new ExternalService.Service03();
//}
//#endregion
#endregion
}
}
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.LifeCycle
{
public class B
{
#region [ - Ctor - ]
public B()
{
//Eager Composition
Ref_Service01 = new ExternalService.Service01();
Ref_Service02 = new ExternalService.Service02();
Ref_Service03 = new ExternalService.Service03();
}
#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 Composition:
//#region [ - InitializeService01Refrence() - ]
//public void InitializeService01Refrence()
//{
// Ref_Service01 = new ExternalService.Service01();
//}
//#endregion
//#region [ - InitializeService02Refrence() - ]
//public void InitializeService02Refrence()
//{
// Ref_Service02 = new ExternalService.Service02();
//}
//#endregion
//#region [ - InitializeService03Refrence() - ]
//public void InitializeService03Refrence()
//{
// Ref_Service03 = new ExternalService.Service03();
//}
//#endregion
#endregion
}
}
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01.LifeCycle
{
public class C
{
#region [ - Ctor - ]
public C()
{
//Eager Composition
Ref_Service01 = new ExternalService.Service01();
Ref_Service02 = new ExternalService.Service02();
Ref_Service03 = new ExternalService.Service03();
}
#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 Composition:
//#region [ - InitializeService01Refrence() - ]
//public void InitializeService01Refrence()
//{
// Ref_Service01 = new ExternalService.Service01();
//}
//#endregion
//#region [ - InitializeService02Refrence() - ]
//public void InitializeService02Refrence()
//{
// Ref_Service02 = new ExternalService.Service02();
//}
//#endregion
//#region [ - InitializeService03Refrence() - ]
//public void InitializeService03Refrence()
//{
// Ref_Service03 = new ExternalService.Service03();
//}
//#endregion
#endregion
}
}
@@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution01
{
class Program
{
static void Main(string[] args)
{
LifeCycle.A Ref_A = new LifeCycle.A(new ExternalService.Service01(),
new ExternalService.Service02(),
new ExternalService.Service03());
LifeCycle.B Ref_B = new LifeCycle.B();
LifeCycle.C Ref_C = new LifeCycle.C();
// Active
#region [ - Eager Composition - ]
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
#region [ - Lazy Composition - ]
//#region [ - A - ]
//Console.WriteLine("A:");
//Ref_A.InitializeService01Refrence();
//Ref_A.Ref_Service01.M1();
//Ref_A.InitializeService02Refrence();
//Ref_A.Ref_Service02.M2();
//Ref_A.InitializeService03Refrence();
//Ref_A.Ref_Service03.M3();
//#endregion
//#region [ - B - ]
//Console.WriteLine("B:");
//Ref_B.InitializeService01Refrence();
//Ref_B.Ref_Service01.M1();
//Ref_B.InitializeService02Refrence();
//Ref_B.Ref_Service02.M2();
//Ref_B.InitializeService03Refrence();
//Ref_B.Ref_Service03.M3();
//#endregion
//#region [ - C - ]
//Console.WriteLine("C:");
//Ref_C.InitializeService01Refrence();
//Ref_C.Ref_Service01.M1();
//Ref_C.InitializeService02Refrence();
//Ref_C.Ref_Service02.M2();
//Ref_C.InitializeService03Refrence();
//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_Solution01")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DIP_Solution01")]
[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("0486b1d9-eafd-4449-b375-bcd2f2819933")]
// 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 @@
bc14799579aaa2c0030d531b5cd699cc7d64e75d
@@ -0,0 +1,7 @@
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\bin\Debug\DIP_Solution01.exe.config
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\bin\Debug\DIP_Solution01.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\bin\Debug\DIP_Solution01.pdb
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\obj\Debug\DIP_Solution01.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\obj\Debug\DIP_Solution01.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\obj\Debug\DIP_Solution01.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution01\obj\Debug\DIP_Solution01.pdb
@@ -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,60 @@
<?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>{FC515F23-9748-41B8-B33B-89BBAF4E8016}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>DIP_Solution02</RootNamespace>
<AssemblyName>DIP_Solution02</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" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.ExternalService
{
public class Service01
{
#region [ - Ctor - ]
public Service01()
{
}
#endregion
#region [ - Method - ]
public void M1()
{
Console.WriteLine("M1 is running ...");
}
#endregion
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.ExternalService
{
public class Service02
{
#region [ - Ctor - ]
public Service02()
{
}
#endregion
#region [ - Method - ]
public void M2()
{
Console.WriteLine("M2 is running ...");
}
#endregion
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.ExternalService
{
public class Service03
{
#region [ - Ctor - ]
public Service03()
{
}
#endregion
#region [ - Method - ]
public void M3()
{
Console.WriteLine("M3 is running ...");
}
#endregion
}
}
@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.LifeCycle
{
public class A
{
#region [ - Ctor - ]
#region [ - A(ExternalService.Service01 ref_Service01 ExternalService.Service02 ref_Service02 ExternalService.Service03 ref_Service03) - ]
////Eager Aggregation
//public A(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 [ - A() - ]
public A()
{
}
#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
}
}
@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.LifeCycle
{
public class B
{
#region [ - Ctor - ]
#region [ - B(ExternalService.Service01 ref_Service01 ExternalService.Service02 ref_Service02 ExternalService.Service03 ref_Service03) - ]
////Eager Aggregation
//public B(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 [ - B() - ]
public B()
{
}
#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
}
}
@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02.LifeCycle
{
public class C
{
#region [ - Ctor - ]
#region [ - C(ExternalService.Service01 ref_Service01 ExternalService.Service02 ref_Service02 ExternalService.Service03 ref_Service03) - ]
////Eager Aggregation
//public C(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 [ - C() - ]
public C()
{
}
#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
}
}
@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution02
{
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();
// Disable
#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
// Active
#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
#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
#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_Solution02")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DIP_Solution02")]
[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("fc515f23-9748-41b8-b33b-89bbaf4e8016")]
// 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 @@
bc14799579aaa2c0030d531b5cd699cc7d64e75d
@@ -0,0 +1,7 @@
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\bin\Debug\DIP_Solution02.exe.config
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\bin\Debug\DIP_Solution02.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\bin\Debug\DIP_Solution02.pdb
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\obj\Debug\DIP_Solution02.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\obj\Debug\DIP_Solution02.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\obj\Debug\DIP_Solution02.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution02\obj\Debug\DIP_Solution02.pdb
@@ -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>
@@ -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
}
}
@@ -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
}
}
@@ -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
}
}
@@ -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 @@
cea1fc0e6df5af2bbcaf0de8940de2f746904f4c
@@ -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
@@ -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>{8DDB2F59-34EA-4008-A736-612FCF6F5EDD}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>DIP_Solution04</RootNamespace>
<AssemblyName>DIP_Solution04</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_Solution04.ExternalService
{
public class Service01
{
#region [ - Ctor - ]
public Service01()
{
}
#endregion
#region [ - Method - ]
#region [ - M1() - ]
public 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_Solution04.ExternalService
{
public class Service02
{
#region [ - Ctor - ]
public Service02()
{
}
#endregion
#region [ - Method - ]
#region [ - M2() - ]
public 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_Solution04.ExternalService
{
public class Service03
{
#region [ - Ctor - ]
public Service03()
{
}
#endregion
#region [ - Method - ]
#region [ - M3() - ]
public void M3()
{
Console.WriteLine("M3 is running ...");
}
#endregion
#endregion
}
}
@@ -0,0 +1,68 @@
using DIP_Solution04.ExternalService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution04.Framework.Base
{
public class BaseService : Interface.IService
{
#region [ - Ctor - ]
#region [ - BaseService(ExternalService.Service01 ref_Service01, ExternalService.Service02 ref_Service02, ExternalService.Service03 ref_Service03) - ]
//Eager Aggregation
public BaseService(Service01 ref_Service01,
Service02 ref_Service02,
Service03 ref_Service03)
{
Ref_Service01 = ref_Service01;
Ref_Service02 = ref_Service02;
Ref_Service03 = ref_Service03;
}
#endregion
#region [ - BaseService() - ]
public BaseService()
{
}
#endregion
#endregion
#region [ - Props - ]
public Service01 Ref_Service01 { get; set; }
public Service02 Ref_Service02 { get; set; }
public Service03 Ref_Service03 { get; set; }
#endregion
#region [ - Methods - ]
// Implement Lazy Aggregation
#region [ - GenerateService01(Service01 ref_Service01) - ]
public void GenerateService01(Service01 ref_Service01)
{
Ref_Service01 = ref_Service01;
}
#endregion
#region [ - GenerateService02(Service02 ref_Service02) - ]
public void GenerateService02(Service02 ref_Service02)
{
Ref_Service02 = ref_Service02;
}
#endregion
#region [ - GenerateService03(Service03 ref_Service03) - ]
public void GenerateService03(Service03 ref_Service03)
{
Ref_Service03 = ref_Service03;
}
#endregion
#endregion
}
}
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution04.Framework.Interface
{
interface IService
{
#region [ - Props - ]
ExternalService.Service01 Ref_Service01{ get; set; }
ExternalService.Service02 Ref_Service02{ get; set; }
ExternalService.Service03 Ref_Service03{ get; set; }
#endregion
#region [ - Methods - ]
#region [ - GenerateService01(ExternalService.Service01 ref_Service01) - ]
void GenerateService01(ExternalService.Service01 ref_Service01);
#endregion
#region [ - GenerateService02(ExternalService.Service02 ref_Service02) - ]
void GenerateService02(ExternalService.Service02 ref_Service02);
#endregion
#region [ - GenerateService03(ExternalService.Service03 ref_Service03) - ]
void GenerateService03(ExternalService.Service03 ref_Service03);
#endregion
#endregion
}
}
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution04.LifeCycle
{
public class A: Framework.Base.BaseService
{
#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_Solution04.LifeCycle
{
public class B: Framework.Base.BaseService
{
#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_Solution04.LifeCycle
{
public class C: Framework.Base.BaseService
{
#region [ - Ctor - ]
public C() : base(new ExternalService.Service01(), new ExternalService.Service02(), new ExternalService.Service03())
{
}
#endregion
}
}
@@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DIP_Solution04
{
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();
// Disable
#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
// Active
#region [ - Lazy Aggregation - ]
#region [ - A - ]
Console.WriteLine("A:");
Ref_A.GenerateService01(new ExternalService.Service01());
Ref_A.Ref_Service01.M1();
Ref_A.GenerateService02(new ExternalService.Service02());
Ref_A.Ref_Service02.M2();
Ref_A.GenerateService03(new ExternalService.Service03());
Ref_A.Ref_Service03.M3();
#endregion
Console.WriteLine("--------------");
#region [ - B - ]
Console.WriteLine("B:");
Ref_B.GenerateService01(new ExternalService.Service01());
Ref_B.Ref_Service01.M1();
Ref_B.GenerateService02(new ExternalService.Service02());
Ref_B.Ref_Service02.M2();
Ref_B.GenerateService03(new ExternalService.Service03());
Ref_B.Ref_Service03.M3();
#endregion
Console.WriteLine("--------------");
#region [ - C - ]
Console.WriteLine("C:");
Ref_C.GenerateService01(new ExternalService.Service01());
Ref_C.Ref_Service01.M1();
Ref_C.GenerateService02(new ExternalService.Service02());
Ref_C.Ref_Service02.M2();
Ref_C.GenerateService03(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_Solution04")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DIP_Solution04")]
[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("8ddb2f59-34ea-4008-a736-612fcf6f5edd")]
// 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 @@
d68365b161194bf2db16706aba6cc2d2f704eecc92f60bbead37d172ee57baa7
@@ -0,0 +1,11 @@
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\bin\Debug\DIP_Solution04.exe.config
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\bin\Debug\DIP_Solution04.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\bin\Debug\DIP_Solution04.pdb
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.exe
E:\Ali\Programming\ASP.net\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.pdb
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.csproj.AssemblyReference.cache
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.csproj.CoreCompileInputs.cache
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.exe
E:\Ali\Programming\ASP.net\MFT\Projects\H\Session07\Session07\Session07\DIP_Solution04\obj\Debug\DIP_Solution04.pdb
@@ -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
}
}

Some files were not shown because too many files have changed in this diff Show More