Exemplo n.º 1
0
 public ObjectMediaEventArgs(bool success, string version, MediaEntry[] faceMedia)
 {
     this.Success = success;
     this.Version = version;
     this.FaceMedia = faceMedia;
 }
Exemplo n.º 2
0
        public string Verb = "UPDATE"; // "GET" or "UPDATE"

        #endregion Fields

        #region Methods

        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="map">An <see cref="OSDMap"/> containing the data</param>
        public override void Deserialize(OSDMap map)
        {
            PrimID = map["object_id"].AsUUID();

            if (map["object_media_data"].Type == OSDType.Array)
            {
                OSDArray mediaData = (OSDArray)map["object_media_data"];
                if (mediaData.Count > 0)
                {
                    FaceMedia = new MediaEntry[mediaData.Count];
                    for (int i = 0; i < mediaData.Count; i++)
                    {
                        if (mediaData[i].Type == OSDType.Map)
                        {
                            FaceMedia[i] = MediaEntry.FromOSD(mediaData[i]);
                        }
                    }
                }
            }
            Verb = map["verb"].AsString();
        }
Exemplo n.º 3
0
 /// <summary>
 /// This method frees the media array if capacity is less than 1 (media list with no entries), otherwise allocates a new array of the specified size.
 /// </summary>
 /// <param name="capacity"></param>
 public void New(int capacity)
 {
     lock (this)
     {
         // m_MediaList = new Dictionary<int, MediaEntry>();
         if (capacity <= 0)
             m_MediaFaces = null;
         else
             m_MediaFaces = new MediaEntry[capacity];
     }
 }
Exemplo n.º 4
0
 public PrimMedia(PrimMedia other) : base()
 {
     m_MediaFaces = other.CopyArray();
 }
Exemplo n.º 5
0
 public PrimMedia(MediaEntry[] entries) : base()
 {
     m_MediaFaces = entries.Clone() as MediaEntry[];
 }
Exemplo n.º 6
0
 public PrimMedia(PrimMedia other) : base()
 {
     if ((other == null) || (other.m_MediaFaces == null))
     {
         New(0);
     }
     else
     {
         lock (this)
         {
             m_MediaFaces = other.CopyArray();
         }
     }
 }