From: Oleg T. <he...@us...> - 2005-10-28 20:08:10
|
Update of /cvsroot/mvp-xml/Common/v2/src/Serialization In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22412/v2/src/Serialization Added Files: CacheKeyFactory.cs PerfCounterInstaller.cs PerfCounterInstaller.resx PerfCounterManager.cs SignatureExtractor.cs StringSorter.cs XmlAttributeOverridesThumbprinter.cs XmlSerializerCache.cs Log Message: --- NEW FILE: XmlSerializerCache.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: XmlAttributeOverridesThumbprinter.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SignatureExtractor.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: PerfCounterInstaller.resx --- <?xml version="1.0" encoding="utf-8" ?> <root> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="ResMimeType"> <value>text/microsoft-resx</value> </resheader> <resheader name="Version"> <value>1.0.0.0</value> </resheader> <resheader name="Reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="Writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> --- NEW FILE: StringSorter.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CacheKeyFactory.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: PerfCounterManager.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: PerfCounterInstaller.cs --- using System; using System.ComponentModel; using System.Configuration.Install; using System.Diagnostics; namespace Mvp.Xml.Common.Serialization { /// <summary> /// Summary description for Installer1. /// </summary> [RunInstaller(true)] public class PerfCounterInstaller : System.Configuration.Install.Installer { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; /// <summary> /// Instantiates the custom installer class /// </summary> public PerfCounterInstaller() { System.Diagnostics.Debug.WriteLine( "PerfCounterInstaller: done" ); // This call is required by the Designer. InitializeComponent(); try { // Create an instance of 'PerformanceCounterInstaller'. PerformanceCounterInstaller performanceCounterInstaller = new PerformanceCounterInstaller(); // Set the 'CategoryName' for performance counter. performanceCounterInstaller.CategoryName = PerfCounterManager.CATEGORY; CounterCreationData cacheHitCounterCreation = new CounterCreationData(); cacheHitCounterCreation.CounterName = PerfCounterManager.SERIALIZER_HITS_NAME; cacheHitCounterCreation.CounterHelp = PerfCounterManager.SERIALIZER_HITS_DESCRIPTION; cacheHitCounterCreation.CounterType = PerformanceCounterType.NumberOfItems64; CounterCreationData cachedInstancesCounterCreation = new CounterCreationData(); cachedInstancesCounterCreation.CounterName = PerfCounterManager.CACHED_INSTANCES_NAME; cachedInstancesCounterCreation.CounterHelp = PerfCounterManager.CACHED_INSTANCES_DESCRIPTION; cachedInstancesCounterCreation.CounterType = PerformanceCounterType.NumberOfItems64; // Add a counter to collection of performanceCounterInstaller. performanceCounterInstaller.Counters.Add(cacheHitCounterCreation); performanceCounterInstaller.Counters.Add(cachedInstancesCounterCreation); Installers.Add(performanceCounterInstaller); System.Diagnostics.Debug.WriteLine( "PerfCounterInstaller: Added counters and category" ); } catch(Exception e) { System.Diagnostics.Debug.WriteLine("PerfCounterInstaller Error occured :"+e.Message); } System.Diagnostics.Debug.WriteLine( "PerfCounterInstaller done" ); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); } #endregion } } |