Smrf.NodeXL.GraphMLLib.TwitterGraphMLUtil.AppendValueFromValueDictionary C# (CSharp) Method

AppendValueFromValueDictionary() public static method

public static AppendValueFromValueDictionary ( Object>.Dictionary valueDictionary, String name, GraphMLXmlDocument graphMLXmlDocument, XmlNode edgeOrVertexXmlNode, String graphMLAttributeID ) : System.Boolean
valueDictionary Object>.Dictionary
name String
graphMLXmlDocument Smrf.XmlLib.GraphMLXmlDocument
edgeOrVertexXmlNode System.Xml.XmlNode
graphMLAttributeID String
return System.Boolean
    AppendValueFromValueDictionary
    (
        Dictionary<String, Object> valueDictionary,
        String name,
        GraphMLXmlDocument graphMLXmlDocument,
        XmlNode edgeOrVertexXmlNode,
        String graphMLAttributeID
    )
    {
        Debug.Assert(valueDictionary != null);
        Debug.Assert( !String.IsNullOrEmpty(name) );
        Debug.Assert(graphMLXmlDocument != null);
        Debug.Assert(edgeOrVertexXmlNode != null);
        Debug.Assert( !String.IsNullOrEmpty(graphMLAttributeID) );

        String value;

        if ( TwitterJsonUtil.TryGetJsonValueFromDictionary(
            valueDictionary, name, out value) )
        {
            graphMLXmlDocument.AppendGraphMLAttributeValue(
                edgeOrVertexXmlNode, graphMLAttributeID, value);

            return (true);
        }

        return (false);
    }