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,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