protected virtual void AfterMethodExecution(MethodInfo methodInfo) { IPersistenceConversationInfo att = Metadata.GetConversationInfoFor(methodInfo); var cca = ConversationsContainerAccessor; if (att == null || cca == null) { return; } IConversation c = cca.Container.Get(conversationId); switch (att.ConversationEndMode) { case EndMode.End: c.End(); c.Dispose(); break; case EndMode.Abort: c.Abort(); c.Dispose(); break; case EndMode.CommitAndContinue: c.FlushAndPause(); break; case EndMode.DoNothing: break; default: c.Pause(); break; } }
/* * Resets UI elements. Used after conversation has ended. */ void reset() { if (participantVideoRenderer != null) { //participantVideoRenderer.OnPause (); participantVideoRenderer = null; } localContainer.RemoveAllViews(); localContainer = FindViewById <ViewGroup> (Resource.Id.localContainer); participantContainer.RemoveAllViews(); if (conversation != null) { conversation.Dispose(); conversation = null; } outgoingInvite = null; muteMicrophone = false; muteActionFab.SetImageDrawable(ContextCompat.GetDrawable(this, Resource.Drawable.ic_mic_green_24px)); pauseVideo = false; localVideoActionFab.SetImageDrawable(ContextCompat.GetDrawable(this, Resource.Drawable.ic_videocam_green_24px)); if (conversationsClient != null) { conversationsClient.AudioOutput = AudioOutput.Headset; } setCallAction(); startPreview(); }
protected virtual void ManageException(Exception e) { IConversation c = cca.Container.Unbind(conversationId); if (c != null) { c.Dispose(); } }
private void Dispose(bool disposing) { if (disposing) { IConversation c = cca.Container.Unbind(conversationId); if (c != null) { c.Dispose(); } } }
public void OnSuccess(MethodExecutionArgs eventArgs) { if (IsNoopConversationalMarkerActive) { return; } if (eventArgs.MethodExecutionTag == NestedMethodMarker) { return; } IConversationsContainerAccessor cca = ConversationsContainerAccessor; IConversation c = cca.Container.Get(GetConversationIdMethod.Invoke()); EndMode endMode = GetMethodEndMode(eventArgs.Method); switch (endMode) { case EndMode.End: c.End(); c.Dispose(); break; case EndMode.Abort: c.Abort(); c.Dispose(); break; case EndMode.CommitAndContinue: c.FlushAndPause(); break; default: c.Pause(); break; } }
public void Dispose() { IConversation c = pcm.cca.Container.Get(pcm.GetConvesationId()); switch (endMode) { case ConversationEndMode.End: c.End(); break; case ConversationEndMode.Abort: c.Dispose(); break; default: c.Pause(); break; } }