Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / Xslt / XsltArgumentList.cs / 1 / XsltArgumentList.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System.Collections; using System.Security.Permissions; namespace System.Xml.Xsl { public abstract class XsltMessageEncounteredEventArgs : EventArgs { public abstract string Message { get; } } public delegate void XsltMessageEncounteredEventHandler(object sender, XsltMessageEncounteredEventArgs e); public class XsltArgumentList { private Hashtable parameters = new Hashtable(); private Hashtable extensions = new Hashtable(); // Used for reporting xsl:message's during execution internal XsltMessageEncounteredEventHandler xsltMessageEncountered = null; public XsltArgumentList() {} public object GetParam(string name, string namespaceUri) { return this.parameters[new XmlQualifiedName(name, namespaceUri)]; } public object GetExtensionObject(string namespaceUri) { return this.extensions[namespaceUri]; } public void AddParam(string name, string namespaceUri, object parameter) { CheckArgumentNull(name , "name" ); CheckArgumentNull(namespaceUri, "namespaceUri"); CheckArgumentNull(parameter , "parameter" ); XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri); qname.Verify(); this.parameters.Add(qname, parameter); } public void AddExtensionObject(string namespaceUri, object extension) { CheckArgumentNull(namespaceUri, "namespaceUri"); CheckArgumentNull(extension , "extension" ); this.extensions.Add(namespaceUri, extension); } public object RemoveParam(string name, string namespaceUri) { XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri); object parameter = this.parameters[qname]; this.parameters.Remove(qname); return parameter; } public object RemoveExtensionObject(string namespaceUri) { object extension = this.extensions[namespaceUri]; this.extensions.Remove(namespaceUri); return extension; } public event XsltMessageEncounteredEventHandler XsltMessageEncountered { add { xsltMessageEncountered += value; } remove { xsltMessageEncountered -= value; } } public void Clear() { this.parameters.Clear(); this.extensions.Clear(); xsltMessageEncountered = null; } private static void CheckArgumentNull(object param, string paramName) { if (param == null) { throw new ArgumentNullException(paramName); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System.Collections; using System.Security.Permissions; namespace System.Xml.Xsl { public abstract class XsltMessageEncounteredEventArgs : EventArgs { public abstract string Message { get; } } public delegate void XsltMessageEncounteredEventHandler(object sender, XsltMessageEncounteredEventArgs e); public class XsltArgumentList { private Hashtable parameters = new Hashtable(); private Hashtable extensions = new Hashtable(); // Used for reporting xsl:message's during execution internal XsltMessageEncounteredEventHandler xsltMessageEncountered = null; public XsltArgumentList() {} public object GetParam(string name, string namespaceUri) { return this.parameters[new XmlQualifiedName(name, namespaceUri)]; } public object GetExtensionObject(string namespaceUri) { return this.extensions[namespaceUri]; } public void AddParam(string name, string namespaceUri, object parameter) { CheckArgumentNull(name , "name" ); CheckArgumentNull(namespaceUri, "namespaceUri"); CheckArgumentNull(parameter , "parameter" ); XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri); qname.Verify(); this.parameters.Add(qname, parameter); } public void AddExtensionObject(string namespaceUri, object extension) { CheckArgumentNull(namespaceUri, "namespaceUri"); CheckArgumentNull(extension , "extension" ); this.extensions.Add(namespaceUri, extension); } public object RemoveParam(string name, string namespaceUri) { XmlQualifiedName qname = new XmlQualifiedName(name, namespaceUri); object parameter = this.parameters[qname]; this.parameters.Remove(qname); return parameter; } public object RemoveExtensionObject(string namespaceUri) { object extension = this.extensions[namespaceUri]; this.extensions.Remove(namespaceUri); return extension; } public event XsltMessageEncounteredEventHandler XsltMessageEncountered { add { xsltMessageEncountered += value; } remove { xsltMessageEncountered -= value; } } public void Clear() { this.parameters.Clear(); this.extensions.Clear(); xsltMessageEncountered = null; } private static void CheckArgumentNull(object param, string paramName) { if (param == null) { throw new ArgumentNullException(paramName); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbDeleteCommandTree.cs
- Shared.cs
- Hyperlink.cs
- XmlRawWriter.cs
- CustomCategoryAttribute.cs
- BamlMapTable.cs
- TypeDelegator.cs
- ExpressionBindingCollection.cs
- InlineCollection.cs
- InfoCardArgumentException.cs
- InstanceOwner.cs
- TabControl.cs
- OracleException.cs
- DrawItemEvent.cs
- AnimationStorage.cs
- Point3DConverter.cs
- KeyProperty.cs
- XmlQualifiedName.cs
- DataGridItemEventArgs.cs
- IOException.cs
- XmlSerializerAssemblyAttribute.cs
- DesignerResources.cs
- LicFileLicenseProvider.cs
- GridView.cs
- __Error.cs
- ChangeBlockUndoRecord.cs
- DataTable.cs
- TrackingConditionCollection.cs
- PeerNameRegistration.cs
- MethodSignatureGenerator.cs
- ResXFileRef.cs
- DataTablePropertyDescriptor.cs
- StubHelpers.cs
- WebPartMinimizeVerb.cs
- DataChangedEventManager.cs
- ValueTypeFixupInfo.cs
- XmlSchemaComplexContentExtension.cs
- SweepDirectionValidation.cs
- GridViewCancelEditEventArgs.cs
- MultipartContentParser.cs
- SizeChangedEventArgs.cs
- SimpleWorkerRequest.cs
- ExtensibleClassFactory.cs
- Collection.cs
- DirectoryInfo.cs
- GenericTypeParameterBuilder.cs
- ElementMarkupObject.cs
- EventLog.cs
- BodyWriter.cs
- Transaction.cs
- GregorianCalendar.cs
- CaseInsensitiveHashCodeProvider.cs
- MatrixKeyFrameCollection.cs
- WasEndpointConfigContainer.cs
- VirtualizedItemProviderWrapper.cs
- WebPartManagerInternals.cs
- DictionaryBase.cs
- Pen.cs
- DiscoveryClientElement.cs
- FontUnit.cs
- Helper.cs
- HandleDictionary.cs
- SingleTagSectionHandler.cs
- FieldDescriptor.cs
- SqlBuilder.cs
- PersonalizationDictionary.cs
- Parser.cs
- LayoutEngine.cs
- BinaryWriter.cs
- XmlSchemaSimpleContentExtension.cs
- formatter.cs
- WindowsGraphicsWrapper.cs
- AuthenticationService.cs
- InvalidContentTypeException.cs
- ExpressionEvaluator.cs
- GridViewDeleteEventArgs.cs
- Parsers.cs
- MexServiceChannelBuilder.cs
- Marshal.cs
- CodePageUtils.cs
- PropertyItem.cs
- CounterSample.cs
- Transform.cs
- DocumentPageHost.cs
- SafeSecurityHandles.cs
- QilInvoke.cs
- WorkflowRuntimeServiceElementCollection.cs
- NamedPipeTransportElement.cs
- HttpCapabilitiesSectionHandler.cs
- Form.cs
- InvalidStoreProtectionKeyException.cs
- PrefixQName.cs
- ConfigUtil.cs
- AnnotationAdorner.cs
- ByteViewer.cs
- DataTemplateKey.cs
- InvalidCastException.cs
- FileDialog.cs
- ThreadExceptionDialog.cs
- ToolStripDropDownClosedEventArgs.cs