System.Runtime.Serialization.Formatters.Soap.SoapHandler.Attribute C# (CSharp) Метод

Attribute() приватный Метод

private Attribute ( String prefix, String name, String urn, String value ) : void
prefix String
name String
urn String
value String
Результат void
        internal void Attribute(String prefix, String name, String urn, String value)
        {
#if _DEBUG
            InternalST.Soap( this,SerTraceString("Attribute Begin ", (ParseRecord)stack.Peek(), name, prefix, urn, currentState, headerState));
            InternalST.Soap( this,"Attribute prefix ",prefix,", Name ",name,", urn ",urn, ",value "+value);
#endif
            switch (currentState)
            {
                case InternalParseStateE.Object:
                case InternalParseStateE.Member:

                    ParseRecord pr = (ParseRecord)stack.Peek();

                    String actualName = name;
                    if (!((urn == null) || (urn.Length == 0)) && ((prefix == null) || (prefix.Length == 0)))
                    {
                        // Default namespaces, assign a name to reference urn
                        if (nameSpaceToKey.ContainsKey(urn))
                            actualName = (String)nameSpaceToKey[urn];
                        else
                        {
                            actualName = NextPrefix();
                            nameSpaceToKey[urn] = actualName;
                        }
                        InternalST.Soap( this,"EndAttribute null urn assigned Name ", actualName);                      
                    }

                    if (!((prefix == null) || (actualName == null) ||(value == null)|| (urn == null)))
                    {
                        //  Xml parser returns an end attribute without a begin attribute for xmlns="" (which is a cancellation of a default namespace)
                        // In this case want to avoid the push
                        attributeValues.Push(new AttributeValueEntry(prefix, actualName, value, urn));
                    }
                    break;
                case InternalParseStateE.MemberChild:
                default:
                    MarshalError("EndAttribute, Unknown State ", (ParseRecord)stack.Peek(), name, currentState);
                    break;
            }

#if _DEBUG
            InternalST.Soap( this,SerTraceString("EndAttribute End ", (ParseRecord)stack.Peek(), name, currentState, headerState));
#endif
        }