SWFProcessing.SWFModeller.ABC.AbcCode.GetMetadata C# (CSharp) Method

GetMetadata() private method

Gets the metadata associated with a key
private GetMetadata ( string key ) : string>.Dictionary
key string The key to fetch
return string>.Dictionary
        internal Dictionary<string, string> GetMetadata(string key)
        {
            return this.metadata[key];
        }

Usage Example

Example #1
0
        private byte[] GenerateMetadata(AbcCode code)
        {
            MemoryStream buf = new MemoryStream();
            ABCDataTypeWriter writer = new ABCDataTypeWriter(buf);

            writer.WriteU30Packed((uint)code.MetadataCount);

            foreach (string key in code.MetadataKeys)
            {
                writer.WriteU30Packed((uint)this.stringMarshal.GetIDFor(key));
                Dictionary<string, string> itemInfo = code.GetMetadata(key);
                writer.WriteU30Packed((uint)itemInfo.Count);
                foreach (string itemKey in itemInfo.Keys)
                {
                    writer.WriteU30Packed((uint)this.stringMarshal.GetIDFor(itemKey));
                    writer.WriteU30Packed((uint)this.stringMarshal.GetIDFor(itemInfo[itemKey]));
                }
            }

            writer.Close(); /* Closes the buffer */
            return buf.ToArray();
        }