protected virtual void OnStatusChanged(CodecApiElement element, string[] propertyNamesWhichUpdated) { #if DEBUG foreach (var name in propertyNamesWhichUpdated) { try { var f = GetFieldWithAttributeName(name); if (f != null) { Debug.WriteInfo(_apiNameSpace, "{0} = {1}", name, f.GetValue(this).ToString()); } } catch (Exception e) { Debug.WriteWarn(_apiNameSpace, "Could not get value for debug on property: {0}, {1}", name, e.Message); } } #endif if (StatusChange == null) { return; } try { StatusChange(this, propertyNamesWhichUpdated); } catch (Exception e) { CloudLog.Exception(e); } }
protected CodecApiElement(CodecApiElement parent, string propertyName) { _codec = parent.Codec; _parent = parent; _parent.ChildElementChange += ParentOnChildElementChange; _apiNameSpace = string.Format("{0}{1}{2}", parent.ApiNameSpace, parent.ApiNameSpace.EndsWith("]") ? "" : ".", propertyName); }
private void ParentOnChildElementChange(CodecApiElement childElement, StatusUpdateItem[] statusUpdate) { if (childElement != this) { return; } //Debug.WriteInfo(_apiNameSpace, "OnStatusReceived"); var names = UpdateFromStatus(statusUpdate); if (names.Any()) { OnStatusChanged(this, names); } }
protected override void OnStatusChanged(CodecApiElement element, string[] propertyNamesWhichUpdated) { base.OnStatusChanged(element, propertyNamesWhichUpdated); try { if (StateChange != null) { StateChange(Codec, State); } } catch (Exception e) { CloudLog.Exception(e); } }
protected virtual void OnChildElementChange(CodecApiElement childelement, StatusUpdateItem[] statusupdate) { var handler = ChildElementChange; try { if (handler != null) { handler(childelement, statusupdate); } } catch (Exception e) { CloudLog.Exception(e); } }
protected override void OnStatusChanged(CodecApiElement element, string[] propertyNamesWhichUpdated) { base.OnStatusChanged(element, propertyNamesWhichUpdated); Codec.Calls.OnCallStatusChange(Codec, CallStatusEventType.StatusUpdated, this); }
protected CodecApiElement(CodecApiElement parent, string propertyName, int indexer) : this(parent, propertyName) { _apiNameSpace = _apiNameSpace + "[" + indexer + "]"; }