public static WebLinkFrame Get(Tag tag, ByteVector ident, StringType encoding, bool create) { if (tag == null) { throw new ArgumentNullException("tag"); } if (ident == null) { throw new ArgumentNullException("ident"); } if (ident.Count != 4) { throw new ArgumentException( "Identifier must be four bytes long.", "ident"); } foreach (WebLinkFrame frame in tag.GetFrames <WebLinkFrame>(ident)) { return(frame); } if (!create) { return(null); } WebLinkFrame new_frame = new WebLinkFrame(ident, encoding); tag.AddFrame(new_frame); return(new_frame); }
public override ByteVector Render(byte version) { //if(version != 3 || FrameId != FrameType.TDRC) // return base.Render( version ); string text = ToString(); if (text.Length < 10 || text[4] != '-' || text[7] != '-') { return(base.Render(version)); } ByteVector output = new ByteVector(); WebLinkFrame f = null; // todo output.Add(f.Render(version)); return(output); }