Beispiel #1
0
        /// <summary>
        /// Serialize this container to a JSON <see cref="string"/>.
        /// </summary>
        /// <returns>The container as a JSON <see cref="string"/> if the serialization is successful, <see langword="null"/> otherwise.</returns>
        public string SerializeToJson()
        {
            var visitor = new BuildJsonVisitor();

            JsonVisitorRegistration?.Invoke(visitor);
            return(JsonSerialization.Serialize(this, visitor));
        }
 public ComponentContainerJsonVisitor()
 {
     JsonVisitorRegistration.Invoke(this);
 }