aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.WebRTC/IceCandidate.cs
blob: af9aa19b5f8afc87beac41d5c7b8dd5430dca09d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.WebRTC
{
    public class IceCandidate
    {
        /// <summary>
        /// Gets or sets the SDP mid string.
        /// </summary>
        public String SdpMid { get; set; }

        /// <summary>
        /// Gets or sets the SDP line index string.
        /// </summary>
        public int SdpMLineIndex { get; set; }

        /// <summary>
        /// Gets or sets the candidate string.
        /// </summary>
        public String Sdp { get; set; }
    }
}
pan class="k">public static readonly BusyLock Failed = new BusyLock(null); readonly List<object> objectList; public BusyLock(List<object> objectList) { this.objectList = objectList; } public bool Success { get { return objectList != null; } } public void Dispose() { if (objectList != null) { objectList.RemoveAt(objectList.Count - 1); } } } [ThreadStatic] static List<object> _activeObjects; public static BusyLock Enter(object obj) { List<object> activeObjects = _activeObjects; if (activeObjects == null) activeObjects = _activeObjects = new List<object>(); for (int i = 0; i < activeObjects.Count; i++) { if (activeObjects[i] == obj) return BusyLock.Failed; } activeObjects.Add(obj); return new BusyLock(activeObjects); } } }