public MergeableFileHeader(Key key, string title, MergeableFileHeaderFlags flags, DateTime created, DateTime lastManaged, IHashComputable content, AuthServerInfo[] authServers, byte[] sign, Key recordsetHash) { if (created.Kind != DateTimeKind.Utc || lastManaged.Kind != DateTimeKind.Utc) throw new ArgumentException (); if (content == null) throw new ArgumentNullException (); _key = key; _title = title; _flags = flags; _created = created; _lastManaged = lastManaged; _content = content; _authServers = authServers; _sign = sign; _recordsetHash = (recordsetHash != null ? recordsetHash : new Key (new byte[DefaultAlgorithm.HashByteSize])); if (_recordsetHash.KeyBytes != DefaultAlgorithm.HashByteSize) throw new FormatException (); }
public bool ParseNewPagePostData(Dictionary<string, string> dic, out IHashComputable header, out IHashComputable[] records) { header = new WikiHeader (); records = null; return true; }
public MergeableFileHeader(string title, MergeableFileHeaderFlags flags, IHashComputable content, AuthServerInfo[] authServers) : this(null, title, flags, DateTime.UtcNow, DateTime.UtcNow, content, authServers, null, null) { }
public bool ParseNewPagePostData(Dictionary<string, string> dic, out IHashComputable header, out IHashComputable[] records) { string fpname, fpbody; ParseNewPagePostData (dic, out fpname, out fpbody); header = new SimpleBBSHeader (); if (fpbody.Length == 0) { records = null; } else { records = new IHashComputable[] { new SimpleBBSRecord (fpname, fpbody) }; } return true; }