コード例 #1
0
        private void WriteToStream(object value, Stream writeStream)
        {
            IEnumerable <Representation> list = value as IEnumerable <Representation>;

            if (list != null)
            {
                List <Representation> newList = list.ToList();
                newList.ForEach(this.Prepare);
                this.WriteObject(newList, writeStream);
            }
            else
            {
                Representation representation = value as Representation;
                this.Prepare(representation);
                this.WriteObject(value, writeStream);
            }
        }
コード例 #2
0
		protected virtual void Prepare(Representation representation) {}
コード例 #3
0
 protected virtual void Prepare(Representation representation)
 {
 }