Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 5, 2016
0 parents commit 9b60ef3
Show file tree
Hide file tree
Showing 1,470 changed files with 36,215 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 1606.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Contents at a Glance<br />
<br><br />
About the Author<br><br />
About the Technical Reviewer Acknowledgments <br><br />
Introduction<br><br />
Chapter 1 Introduction to Application Frameworks<br><br />
Chapter 2 Dissection of an Application Framework<br><br />
Chapter 3 An Overview of the Simplified Application Framework<br><br />
Chapter 4 Class Factories<br><br />
Chapter 5 Caching Service<br><br />
Chapter 6 The SAF.Configuration Service <br><br />
Chapter 7 SAF.EventNotification<br><br />
Chapter 8 Windows Services<br><br />
Chapter 9 Message Queue Services<br><br />
Chapter 10 Authorization Service<br><br />
Chapter 11 Authentication Service<br><br />
Chapter 12 Cryptography Service <br><br />
Chapter 13 Transaction Service <br><br />
Chapter 14 DocumentLayer Service<br><br />
Chapter 15 The Workflow Service <br><br />
Index
Binary file added 1616.pdf
Binary file not shown.
Binary file added 1625.pdf
Binary file not shown.
Binary file added 1813.pdf
Binary file not shown.
Binary file added 9781590592885.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2004 Xin Chen

Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes the rights to use, copy, and modify the Software for personal use.
Users are also allowed and encouraged to submit corrections and modifications
to the Software for the benefit of other users.

It is not allowed to reuse, modify, or redistribute the Software for
commercial use in any way, or for a user�s educational materials such as books
or blog articles without prior permission from the copyright holder.

The above copyright notice and this permission notice need to be included
in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#Apress Source Code

This repository accompanies [*Developing Application Frameworks in .NET*](http://www.apress.com/9781590592885) by Xin Chen (Apress, 2004).

![Cover image](9781590592885.jpg)

Download the files as a zip using the green button, or clone the repository to your machine using Git.

##Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

##Contributions

See the file Contributing.md for more information on how you can contribute to this repository.
Binary file added SAF/Certificates/CompanyA.pfx
Binary file not shown.
23 changes: 23 additions & 0 deletions SAF/Certificates/CompanyA_PublicKey.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIIDwDCCAqigAwIBAgIKYRVvPgAAAAAADTANBgkqhkiG9w0BAQUFADASMRAwDgYD
VQQDEwdEZWxsNDIwMB4XDTAzMTAwOTE3MDcwM1oXDTA0MTAwOTE3MTcwM1owEzER
MA8GA1UEAxMIQ29tcGFueUEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANe2
ipQXOcyYiMcbmF+TMY4CsNgOBmC9pnjrEPcVVz6qkel1TxotElENlkw9rTtDPwpj
PBP1BkSha93jBhm6wTaJOG3gXczsf5VJy/b/xYs6wVDi03nEOaeu+816goNsCvf8
rnStuRFlBazw//2mx3P4q0rjZjBIJ+szlBsEX8XTAgMBAAGjggGZMIIBlTAOBgNV
HQ8BAf8EBAMCBPAwRAYJKoZIhvcNAQkPBDcwNTAOBggqhkiG9w0DAgICAIAwDgYI
KoZIhvcNAwQCAgCAMAcGBSsOAwIHMAoGCCqGSIb3DQMHMB0GA1UdDgQWBBTFWpon
5tdZNErzKUr33pgs/AcTRzATBgNVHSUEDDAKBggrBgEFBQcDAjAfBgNVHSMEGDAW
gBTtPRL/6OfaUWW/BVAxYkAGMnHYvTBfBgNVHR8EWDBWMFSgUqBQhiVodHRwOi8v
ZGVsbDQyMC9DZXJ0RW5yb2xsL0RlbGw0MjAuY3JshidmaWxlOi8vXFxkZWxsNDIw
XENlcnRFbnJvbGxcRGVsbDQyMC5jcmwwgYYGCCsGAQUFBwEBBHoweDA5BggrBgEF
BQcwAoYtaHR0cDovL2RlbGw0MjAvQ2VydEVucm9sbC9kZWxsNDIwX0RlbGw0MjAu
Y3J0MDsGCCsGAQUFBzAChi9maWxlOi8vXFxkZWxsNDIwXENlcnRFbnJvbGxcZGVs
bDQyMF9EZWxsNDIwLmNydDANBgkqhkiG9w0BAQUFAAOCAQEAapWhGPqOs+s8jhb/
Ivxr1v/6LI2QwHNJuSZr3oI5tTzs8JVyh9ztsQN/RbHNl/6pUWoH80XdZEEWneYp
9cS+MLKHjLOMgVk8H1eYl7CFlhYZmKWbAqRhMR7sir46DWtee80ypMP3qYeMdK59
IWB6+j4XCgjZg+oIBT8ezm0iSDmYIEBVJNrDv+QlJzrcITOD3NHs6v1oKxr0gvF+
puoj+P1fGS26JLUNQEoWRKJuPjyn3Ju7OfTCCrdRRLqgswISWPcCDoIXTi/j70BT
Gcc6KhjvDehjSj4pj3Oz1Trm5fZ+/eBu6SoaYQalZCyhbrE1cG5ILBjVIQJnq5Yd
ismgew==
-----END CERTIFICATE-----
Binary file added SAF/Certificates/CompanyB.pfx
Binary file not shown.
23 changes: 23 additions & 0 deletions SAF/Certificates/CompanyB_PublicKey.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----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7IkcNyn6FeJrVRTsc6bxhjvMPiW0/lpLTkLaXNQ1pIJe7Xue0z
eVO9yabq64vuzl8m2pxei2jeki5p2ykhOO0PqhjNyaT7bsgw3hJ8NIjzsqCrymsL
7HMBRrzOX+zXg5fyDl6n1Kb8qlQQBqLEEqR3ZlWxpdd07KaSYzCK4fvWUlSeNOpK
xJXqJ3h6izR0xtWawPYUTmnI8Gnc/eyQ2gHnx3hUGqzSuvuiEDYmi8ssNfELJows
IwoHSQ==
-----END CERTIFICATE-----
21 changes: 21 additions & 0 deletions SAF/Certificates/Dell420.cer
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDYjCCAkqgAwIBAgIQelRz2WDSx6lNXeEpgoPgATANBgkqhkiG9w0BAQUFADAS
MRAwDgYDVQQDEwdEZWxsNDIwMB4XDTAzMDcwMjAxNTAxNVoXDTA4MDcwMjAxNTYy
NFowEjEQMA4GA1UEAxMHRGVsbDQyMDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
AQoCggEBALIM6q7qbV4KDv4xIc3AhYzlaN9wFzgW/j4Jm/ig1hnIPWeA22HoZGVL
vWJ/i7qfVLbcYNnth1Ti+H+EjMNSCZabOuvq9x+YEf2J3RNU7oIZotBXNbj120bN
V3tlnSpitzJuPc8erlPDQ9elugP9rHPFuL2noJ6SPmieeh53nlzeMrv9dLC/CYdZ
1QZPQk0rYTyRRlVREw8SsE2jBPOYLC35BtZ1mDtX7VG0JA5asy+/kUgm/nHecZ2f
+ln4HVoqi4eFxbGn/JBJgbXq4+CZc0HzV7prS8W8g+D8gHJvIascepiSEslKIFA/
hkU+ZuROmJMWU+SQs0sDDh37+5WXwwcCAwEAAaOBszCBsDALBgNVHQ8EBAMCAYYw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7T0S/+jn2lFlvwVQMWJABjJx2L0w
XwYDVR0fBFgwVjBUoFKgUIYlaHR0cDovL2RlbGw0MjAvQ2VydEVucm9sbC9EZWxs
NDIwLmNybIYnZmlsZTovL1xcZGVsbDQyMFxDZXJ0RW5yb2xsXERlbGw0MjAuY3Js
MBAGCSsGAQQBgjcVAQQDAgEAMA0GCSqGSIb3DQEBBQUAA4IBAQANf+P55RPAPJaa
Q5peIXof8PDuGTH03AyOjfEclwaAHLGk0dGTSEOre19nkAx1Cx+cm8iH9R7l9Mf3
g83sL+IkSx0ygxFqMo6JhkRBBz/2IvtZSf5VL0Cc7LFNDyc2jAJj5MQzKob5Dmoz
D/NBOyN+FOLxFcZApiAsBS1cyeaUsgRZChkw/CmNDQWpGPzIdp4CzBNCFtjUHlbi
zunxL7aV7TUCcSDhIqe+n0df5UifAtPwCBQdEBFk09EhLaJ6BtGDhv0DMm2rluUt
bRjmwVLL8OWqwYX3jFe9py/jlcHSF80pj8Kb+n8YA7Ucv7W7ztlvYqAIbCH9maCh
1C64h2IN
-----END CERTIFICATE-----
Binary file added SAF/Certificates/XinChen.pfx
Binary file not shown.
58 changes: 58 additions & 0 deletions SAF/SAF.Application.Configuration/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;

//
// 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("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

//
// 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 Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("1.0.*")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
28 changes: 28 additions & 0 deletions SAF/SAF.Application.Configuration/ConfigurationManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Xml;

namespace SAF.Application.Configuration
{
/// <summary>
/// Application specific configuration manager. its design follows
/// that of ConfigurationManager class in SAF.Configuration
/// </summary>
public class ConfigurationManager
{
public DocumentLayerConfiguration DocumentLayerConfig;
public WorkFlowConfiguration WorkFlowConfig;

/// <summary>
/// constructor that takes the xml configuration info and
/// initialize the configuration object to which it holds refereces.
/// </summary>
/// <param name="sections">XmlNode that hold the configuration information</param>
public ConfigurationManager(XmlNode sections)
{
//initialize configuration objects
DocumentLayerConfig = new DocumentLayerConfiguration(sections.SelectSingleNode("DocumentLayers"));
WorkFlowConfig = new WorkFlowConfiguration(sections.SelectSingleNode("WorkFlow"));

}
}
}
36 changes: 36 additions & 0 deletions SAF/SAF.Application.Configuration/DocumentLayerConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Xml;

namespace SAF.Application.Configuration
{
/// <summary>
/// DocumentLayerConfiguration
/// retrieves document layer related configuration settings.
/// </summary>
public class DocumentLayerConfiguration
{
private XmlNode configXml;
public DocumentLayerConfiguration(XmlNode configData)
{
configXml = configData;
}

/// <summary>
/// Get an instance of specific document layer
/// </summary>
/// <param name="name">name of the document layer</param>
/// <returns>an new instance of the document layer.</returns>
public object GetDocumentLayerByName(string name)
{
//retrieve the configuration for a given document layer.
XmlNode layerXml = configXml.SelectSingleNode("DocumentLayer[@name='" + name + "']");
XmlNode firstLayer = layerXml.SelectSingleNode("Layer");
string typeInfo = firstLayer.Attributes["type"].Value;
Type type = Type.GetType(typeInfo);
object[] parameters = new Object[1]{firstLayer};
//create an instance of document layer dynamically.
object Layer = Activator.CreateInstance(type,parameters);
return Layer;
}
}
}
103 changes: 103 additions & 0 deletions SAF/SAF.Application.Configuration/SAF.Application.Configuration.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.0.9466"
SchemaVersion = "1.0"
ProjectGuid = "{AE5F42AC-D432-4B6D-8259-371E4C7FC556}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "SAF.Application.Configuration"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
RootNamespace = "SAF.Application.Configuration"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ConfigurationManager.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "DocumentLayerConfiguration.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "WorkFlowConfiguration.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

Loading

0 comments on commit 9b60ef3

Please sign in to comment.