private String toString(PresContext pc)
 {
     System.Text.StringBuilder sb = new System.Text.StringBuilder(64);
     sb.Append(UIDs.GetName(pc.AbstractSyntaxUID)).Append(pc.TransferSyntaxUIDs);
     return sb.ToString();
 }
Example #2
0
 protected override void Append(PresContext pc, System.Text.StringBuilder sb)
 {
     sb.Append("\n\tpc-").Append(pc.pcid()).Append(":\t").Append(pc.ResultAsString()).Append("\n\t\tts=").Append(UIDs.GetName(pc.TransferSyntaxUID));
 }
Example #3
0
        private PresContext NegotiatePresCtx(PresContext offered)
        {
            int result = PresContext.ABSTRACT_SYNTAX_NOT_SUPPORTED;
            String tsuid = UIDs.ImplicitVRLittleEndian;

            PresContext accept = GetPresContext(offered.AbstractSyntaxUID);
            if (accept != null)
            {
                result = PresContext.TRANSFER_SYNTAXES_NOT_SUPPORTED;
                for ( IEnumerator enu= accept.TransferSyntaxUIDs.GetEnumerator(); enu.MoveNext(); )
                {
                    tsuid = (String) enu.Current;
                    if (offered.TransferSyntaxUIDs.IndexOf(tsuid) != - 1)
                    {
                        result = PresContext.ACCEPTANCE;
                        break;
                    }
                }
            }
            return new PresContext(0x021, offered.pcid(), result, null, new String[]{tsuid});
        }
Example #4
0
 protected override void Append(PresContext pc, System.Text.StringBuilder sb)
 {
     sb.Append("\n\tpc-").Append(pc.pcid()).Append(":\tas=").Append(UIDs.GetName(pc.AbstractSyntaxUID));
     for( IEnumerator enu = pc.TransferSyntaxUIDs.GetEnumerator(); enu.MoveNext(); )
         sb.Append("\n\t\tts=").Append(UIDs.GetName((String) enu.Current));
 }
Example #5
0
 protected abstract void Append(PresContext pc, System.Text.StringBuilder sb);
Example #6
0
 public void AddPresContext(PresContext presCtx)
 {
     if (((PresContext) presCtx).type() != pctype())
     {
         throw new System.ArgumentException("wrong type of " + presCtx);
     }
     presCtxs.Add(presCtx.pcid(), presCtx);
 }