コード例 #1
0
        public void AddUniqueObject(AsfObject obj)
        {
            for (int i = 0; i < children.Count; i++)
            {
                if (((AsfObject)children[i]).Guid == obj.Guid)
                {
                    children[i] = obj;
                    return;
                }
            }

            children.Add(obj);
        }
コード例 #2
0
        public ByteVector Render()
        {
            ByteVector v = AsfObject.RenderUnicode(name);

            ByteVector data = AsfObject.RenderWord((short)v.Count) + v + AsfObject.RenderWord((short)type);

            switch (type)
            {
            case AsfDataType.Unicode:
                v     = AsfObject.RenderUnicode(sValue);
                data += AsfObject.RenderWord((short)v.Count) + v;
                break;

            case AsfDataType.Bytes:
                data.Add(AsfObject.RenderWord((short)bvValue.Count));
                data.Add(bvValue);
                break;

            case AsfDataType.Bool:
                data.Add(AsfObject.RenderWord(4));
                data.Add(AsfObject.RenderDWord((uint)lValue));
                break;

            case AsfDataType.DWord:
                data.Add(AsfObject.RenderWord(4));
                data.Add(AsfObject.RenderDWord((uint)lValue));
                break;

            case AsfDataType.QWord:
                data.Add(AsfObject.RenderWord(8));
                data.Add(AsfObject.RenderQWord(lValue));
                break;

            case AsfDataType.Word:
                data.Add(AsfObject.RenderWord(2));
                data.Add(AsfObject.RenderWord((short)lValue));
                break;

            default:
                return(null);
            }

            return(data);
        }
コード例 #3
0
 public void AddObject(AsfObject obj)
 {
     children.Add(obj);
 }
コード例 #4
0
		public void AddUniqueObject(AsfObject obj)
		{
			for (int i = 0; i < children.Count; i++)
				if (((AsfObject)children[i]).Guid == obj.Guid)
				{
					children[i] = obj;
					return;
				}

			children.Add(obj);
		}		
コード例 #5
0
		public void AddObject(AsfObject obj)
		{
			children.Add(obj);
		}