本文整理汇总了C#中System.Xml.XmlQualifiedName类的典型用法代码示例。如果您正苦于以下问题:C# XmlQualifiedName类的具体用法?C# XmlQualifiedName怎么用?C# XmlQualifiedName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlQualifiedName类属于System.Xml命名空间,在下文中一共展示了XmlQualifiedName类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SamlAuthorityBinding
public SamlAuthorityBinding(XmlQualifiedName authorityKind, string binding, string location)
{
this.AuthorityKind = authorityKind;
this.Binding = binding;
this.Location = location;
this.CheckObjectValidity();
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SamlAuthorityBinding.cs
示例2: IsSpecialXmlType
internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
{
xsdType = null;
hasRoot = true;
if (type == Globals.TypeOfXmlElement || type == Globals.TypeOfXmlNodeArray)
{
string name = null;
if (type == Globals.TypeOfXmlElement)
{
xsdType = CreateAnyElementType();
name = "XmlElement";
hasRoot = false;
}
else
{
xsdType = CreateAnyType();
name = "ArrayOfXmlNode";
hasRoot = true;
}
typeName = new XmlQualifiedName(name, DataContract.GetDefaultStableNamespace(type));
return true;
}
typeName = null;
return false;
}
开发者ID:Profit0004,项目名称:mono,代码行数:25,代码来源:SchemaExporter_mobile.cs
示例3: FaultException
public FaultException(string action, string reason, XmlQualifiedName code, IEnumerable<XmlQualifiedName> subcodes)
{
_action = action;
_reason = reason;
_code = code;
_subcodes = subcodes.ToList();
}
开发者ID:SzymonPobiega,项目名称:WS-Man.Net,代码行数:7,代码来源:FaultException.cs
示例4: AddElementToSchema
void AddElementToSchema(XmlSchemaElement element, string elementNs, XmlSchemaSet schemaSet)
{
OperationDescription parentOperation = this.operation;
if (parentOperation.OperationMethod != null)
{
XmlQualifiedName qname = new XmlQualifiedName(element.Name, elementNs);
OperationElement existingElement;
if (ExportedMessages.ElementTypes.TryGetValue(qname, out existingElement))
{
if (existingElement.Operation.OperationMethod == parentOperation.OperationMethod)
return;
if (!SchemaHelper.IsMatch(element, existingElement.Element))
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CannotHaveTwoOperationsWithTheSameElement5, parentOperation.OperationMethod.DeclaringType, parentOperation.OperationMethod.Name, qname, existingElement.Operation.OperationMethod.DeclaringType, existingElement.Operation.Name)));
}
return;
}
else
{
ExportedMessages.ElementTypes.Add(qname, new OperationElement(element, parentOperation));
}
}
SchemaHelper.AddElementToSchema(element, SchemaHelper.GetSchema(elementNs, schemaSet), schemaSet);
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:25,代码来源:MessageContractExporter.cs
示例5: ValidateElement
public override object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode)
{
object obj2 = this.elements[name];
errorCode = 0;
if (obj2 == null)
{
context.NeedValidateChildren = false;
return null;
}
int index = (int) obj2;
if (context.AllElementsSet[index])
{
errorCode = -2;
return null;
}
if (context.CurrentState.AllElementsRequired == -1)
{
context.CurrentState.AllElementsRequired = 0;
}
context.AllElementsSet.Set(index);
if (this.isRequired[index])
{
context.CurrentState.AllElementsRequired++;
}
return this.particles[index];
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:AllElementsContentValidator.cs
示例6: AddSymbol
protected SymbolEntry AddSymbol(
XmlQualifiedName qname, XmlSchemaObject schemaObject, string suffix)
{
SymbolEntry symbol = new SymbolEntry();
symbol.xsdNamespace = qname.Namespace;
symbol.clrNamespace = configSettings.GetClrNamespace(qname.Namespace);
symbol.symbolName = qname.Name;
string identifierName = NameGenerator.MakeValidIdentifier(
symbol.symbolName, this.configSettings.NameMangler2);
symbol.identifierName = identifierName;
int id = 0;
if(symbols.ContainsKey(symbol))
{
identifierName = identifierName + suffix;
symbol.identifierName = identifierName;
while (symbols.ContainsKey(symbol))
{
id++;
symbol.identifierName = identifierName + id.ToString(CultureInfo.InvariantCulture.NumberFormat);
}
}
if(symbol.isNameFixed())
nFixedNames++;
symbols.Add(symbol, symbol);
schemaNameToIdentifiers.Add(schemaObject, symbol.identifierName); //Type vs typeName
return symbol;
}
开发者ID:dipdapdop,项目名称:linqtoxsd,代码行数:28,代码来源:NameMangler.cs
示例7: XmlFragmentReader
/// <summary>
/// Instantiates the reader using the given <paramref name="rootName"/> for the virtual root node.
/// </summary>
/// <param name="baseReader">XML fragment reader.</param>
/// <param name="rootName">Qualified name of the virtual root element.</param>
public XmlFragmentReader(XmlQualifiedName rootName, XmlReader baseReader)
: base(baseReader)
{
Guard.ArgumentNotNull(rootName, "rootName");
Initialize(rootName);
}
开发者ID:zanyants,项目名称:mvp.xml,代码行数:12,代码来源:XmlFragmentReader.cs
示例8: QueryOutputWriterV1
public QueryOutputWriterV1(XmlWriter writer, XmlWriterSettings settings)
{
_wrapped = writer;
_systemId = settings.DocTypeSystem;
_publicId = settings.DocTypePublic;
if (settings.OutputMethod == XmlOutputMethod.Xml)
{
bool documentConformance = false;
// Xml output method shouldn't output doc-type-decl if system ID is not defined (even if public ID is)
// Only check for well-formed document if output method is xml
if (_systemId != null)
{
documentConformance = true;
_outputDocType = true;
}
// Check for well-formed document if standalone="yes" in an auto-generated xml declaration
if (settings.Standalone == XmlStandalone.Yes)
{
documentConformance = true;
_standalone = settings.Standalone;
}
if (documentConformance)
{
if (settings.Standalone == XmlStandalone.Yes)
{
_wrapped.WriteStartDocument(true);
}
else
{
_wrapped.WriteStartDocument();
}
}
if (settings.CDataSectionElements != null && settings.CDataSectionElements.Count > 0)
{
_bitsCData = new BitStack();
_lookupCDataElems = new Dictionary<XmlQualifiedName, XmlQualifiedName>();
_qnameCData = new XmlQualifiedName();
// Add each element name to the lookup table
foreach (XmlQualifiedName name in settings.CDataSectionElements)
{
_lookupCDataElems[name] = null;
}
_bitsCData.PushBit(false);
}
}
else if (settings.OutputMethod == XmlOutputMethod.Html)
{
// Html output method should output doc-type-decl if system ID or public ID is defined
if (_systemId != null || _publicId != null)
_outputDocType = true;
}
}
开发者ID:geoffkizer,项目名称:corefx,代码行数:60,代码来源:QueryOutputWriterV1.cs
示例9: CheckValueFacets
internal override Exception CheckValueFacets(XmlQualifiedName value, XmlSchemaDatatype datatype)
{
RestrictionFacets restriction = datatype.Restriction;
RestrictionFlags flags = (restriction != null) ? restriction.Flags : ((RestrictionFlags) 0);
if (flags != 0)
{
int length = value.ToString().Length;
if (((flags & RestrictionFlags.Length) != 0) && (restriction.Length != length))
{
return new XmlSchemaException("Sch_LengthConstraintFailed", string.Empty);
}
if (((flags & RestrictionFlags.MinLength) != 0) && (length < restriction.MinLength))
{
return new XmlSchemaException("Sch_MinLengthConstraintFailed", string.Empty);
}
if (((flags & RestrictionFlags.MaxLength) != 0) && (restriction.MaxLength < length))
{
return new XmlSchemaException("Sch_MaxLengthConstraintFailed", string.Empty);
}
if (((flags & RestrictionFlags.Enumeration) != 0) && !this.MatchEnumeration(value, restriction.Enumeration))
{
return new XmlSchemaException("Sch_EnumerationConstraintFailed", string.Empty);
}
}
return null;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:QNameFacetsChecker.cs
示例10: AddItem
internal XmlSchemaObject AddItem(XmlSchemaObject item, XmlQualifiedName qname, XmlSchemas schemas)
{
if (item == null)
{
return null;
}
if ((qname == null) || qname.IsEmpty)
{
return null;
}
string str = item.GetType().Name + ":" + qname.ToString();
ArrayList list = (ArrayList) this.ObjectCache[str];
if (list == null)
{
list = new ArrayList();
this.ObjectCache[str] = list;
}
for (int i = 0; i < list.Count; i++)
{
XmlSchemaObject obj2 = (XmlSchemaObject) list[i];
if (obj2 == item)
{
return obj2;
}
if (this.Match(obj2, item, true))
{
return obj2;
}
this.Warnings.Add(Res.GetString("XmlMismatchSchemaObjects", new object[] { item.GetType().Name, qname.Name, qname.Namespace }));
this.Warnings.Add("DEBUG:Cached item key:\r\n" + ((string) this.looks[obj2]) + "\r\nnew item key:\r\n" + ((string) this.looks[item]));
}
list.Add(item);
return item;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:34,代码来源:SchemaObjectCache.cs
示例11: SoapException
public SoapException (string message, XmlQualifiedName code, string actor, XmlNode detail)
: base (message)
{
this.code = code;
this.actor = actor;
this.detail = detail;
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:SoapException.cs
示例12: AddBindingParameters
/**
* The execution of this behavior comes rather late.
* Anyone that inspects the service description in the meantime,
* such as for metadata generation, won't see the protection level that we want to use.
*
* One way of doing it is at when create HostFactory
*
* ServiceEndpoint endpoint = host.Description.Endpoints.Find(typeof(IService));
* OperationDescription operation = endpoint.Contract.Operations.Find("Action");
* MessageDescription message = operation.Messages.Find("http://tempuri.org/IService/ActionResponse");
* MessageHeaderDescription header = message.Headers[new XmlQualifiedName("aheader", "http://tempuri.org/")];
* header.ProtectionLevel = ProtectionLevel.Sign;
*
* **/
public void AddBindingParameters(ContractDescription contractDescription, ServiceEndpoint endpoint, BindingParameterCollection bindingParameters)
{
ChannelProtectionRequirements requirements = bindingParameters.Find<ChannelProtectionRequirements>();
XmlQualifiedName qName = new XmlQualifiedName(header, ns);
MessagePartSpecification part = new MessagePartSpecification(qName);
requirements.OutgoingSignatureParts.AddParts(part, action);
}
开发者ID:cleancodenz,项目名称:ServiceBus,代码行数:21,代码来源:SignMessageHeaderBehavior.cs
示例13: Compile
// 1. name and public must be present
// public and system must be anyURI
internal override int Compile(ValidationEventHandler h, XmlSchema schema)
{
// If this is already compiled this time, simply skip.
if (CompilationId == schema.CompilationId)
return 0;
if(Name == null)
error(h,"Required attribute name must be present");
else if(!XmlSchemaUtil.CheckNCName(this.name))
error(h,"attribute name must be NCName");
else
qualifiedName = new XmlQualifiedName(Name, AncestorSchema.TargetNamespace);
if(Public==null)
error(h,"public must be present");
else if(!XmlSchemaUtil.CheckAnyUri(Public))
error(h,"public must be anyURI");
if(system != null && !XmlSchemaUtil.CheckAnyUri(system))
error(h,"system must be present and of Type anyURI");
XmlSchemaUtil.CompileID(Id,this,schema.IDCollection,h);
return errorCount;
}
开发者ID:nobled,项目名称:mono,代码行数:27,代码来源:XmlSchemaNotation.cs
示例14: Binding
public Binding ()
{
extensions = new ServiceDescriptionFormatExtensionCollection (this);
operations = new OperationBindingCollection (this);
serviceDescription = null;
type = XmlQualifiedName.Empty;
}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:Binding.cs
示例15: RemoveParam
public object RemoveParam(string name, string namespaceUri)
{
XmlQualifiedName key = new XmlQualifiedName(name, namespaceUri);
object obj2 = this.parameters[key];
this.parameters.Remove(key);
return obj2;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:XsltArgumentList.cs
示例16: AddToTable
public static void AddToTable (XmlSchemaObjectTable table, XmlSchemaObject obj,
XmlQualifiedName qname, ValidationEventHandler h)
{
if (table.Contains (qname)) {
// FIXME: This logic unexpectedly allows
// one redefining item and two or more redefining items.
// FIXME: redefining item is not simple replacement,
// but much more complex stuff.
if (obj.isRedefineChild) { // take precedence.
if (obj.redefinedObject != null)
obj.error (h, String.Format ("Named item {0} was already contained in the schema object table.", qname));
else
obj.redefinedObject = table [qname];
table.Set (qname, obj);
}
else if (table [qname].isRedefineChild) {
if (table [qname].redefinedObject != null)
obj.error (h, String.Format ("Named item {0} was already contained in the schema object table.", qname));
else
table [qname].redefinedObject = obj;
return; // never add to the table.
}
else if (StrictMsCompliant) {
table.Set (qname, obj);
}
else
obj.error (h, String.Format ("Named item {0} was already contained in the schema object table. {1}",
qname, "Consider setting MONO_STRICT_MS_COMPLIANT to 'yes' to mimic MS implementation."));
}
else
table.Set (qname, obj);
}
开发者ID:carrie901,项目名称:mono,代码行数:32,代码来源:XmlSchemaUtil.cs
示例17: TranslateFaultCode
private static XmlQualifiedName TranslateFaultCode(XmlQualifiedName code)
{
if (code.Namespace != "http://schemas.xmlsoap.org/soap/envelope/")
{
if (!(code.Namespace == "http://www.w3.org/2003/05/soap-envelope"))
{
return code;
}
if (code.Name == "Receiver")
{
return SoapException.ServerFaultCode;
}
if (code.Name == "Sender")
{
return SoapException.ClientFaultCode;
}
if (code.Name == "MustUnderstand")
{
return SoapException.MustUnderstandFaultCode;
}
if (code.Name == "VersionMismatch")
{
return SoapException.VersionMismatchFaultCode;
}
}
return code;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:Soap11ServerProtocolHelper.cs
示例18: MarkedHighlightComponent
//-----------------------------------------------------
//
// ctors
//
//-----------------------------------------------------
#region ctors
/// <summary>
/// Creates a new component
/// </summary>
/// <param name="type">owning component type </param>
/// <param name="host">Dependency object to host IsActive and IsMouseOverAnchor DepenedencyProperties
/// if host is null - set them on MarkedHighlightComponent itself</param>
public MarkedHighlightComponent(XmlQualifiedName type, DependencyObject host)
: base()
{
if (type == null)
{
throw new ArgumentNullException("type");
}
_DPHost = host == null ? this : host;
ClipToBounds = false;
//create anchor highlight. The second parameter controls
// if we want to render the entire anchor or only the Text content
// This applies specificaly to tables, figures and floaters.
// Currently implementation of GetTightBoundingGeometryForTextPointers does not
// allow us to render the entire cell so we pass true (means content only).
HighlightAnchor = new HighlightComponent(1, true, type);
Children.Add(HighlightAnchor);
//we will add the markers when the attached annotation is added
//when we know the attachment level
_leftMarker = null;
_rightMarker = null;
_state = 0;
SetState();
}
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:40,代码来源:MarkedHighlightComponent.cs
示例19: MessagePart
public MessagePart ()
{
element = XmlQualifiedName.Empty;
message = null;
type = XmlQualifiedName.Empty;
extensions = new ServiceDescriptionFormatExtensionCollection (this);
}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:MessagePart.cs
示例20: HashCodeTest
public void HashCodeTest()
{
QualifiedName name1 = new QualifiedName("foo", "http://foo.com", "f");
XmlQualifiedName xmlQualifiedName = new XmlQualifiedName("foo", "http://foo.com");
Assert.AreEqual(name1.GetHashCode(), xmlQualifiedName.GetHashCode());
}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:QualifiedNameTestFixture.cs
注:本文中的System.Xml.XmlQualifiedName类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论