Example #1
0
        private void writeServiceType(IServiceFamilyConfiguration serviceType, TextReportWriter reportWriter)
        {
            reportWriter.AddDivider('-');

            var name = serviceType.ServiceType.ShortNameInCode();
            var ns   = serviceType.ServiceType.Namespace;

            var contents = new[]
            {
                name,
                ns,
                string.Empty,
                string.Empty,
                string.Empty
            };

            if (name.Length > 75)
            {
                contents[0] = contents[1] = string.Empty;
                reportWriter.AddContent("ServiceType: " + name);
                reportWriter.AddContent("  Namespace: " + ns);
            }

            var instances        = serviceType.Instances.ToArray();
            var instanceRegistry = new List <InstanceRef>(instances.Length);

            setContents(contents, instances[0], instanceRegistry);
            reportWriter.AddText(contents);

            for (int i = 1; i < serviceType.Instances.Count(); i++)
            {
                writeInstance(instances[i], serviceType, reportWriter, instanceRegistry);
            }
        }
Example #2
0
        private void writeServiceType(IServiceFamilyConfiguration serviceType)
        {
            _writer.AddDivider('-');

            var name = serviceType.ServiceType.ShortNameInCode();
            var ns   = serviceType.ServiceType.Namespace;

            var contents = new[]
            {
                name,
                ns,
                string.Empty,
                string.Empty,
                string.Empty
            };

            if (name.Length > 75)
            {
                contents[0] = contents[1] = string.Empty;
                _writer.AddContent("ServiceType: " + name);
                _writer.AddContent("  Namespace: " + ns);
            }



            var instances = serviceType.Instances.ToArray();

            setContents(contents, instances[0], instances[0].Name, instances[0] == serviceType.Default);
            _writer.AddText(contents);


            for (int i = 1; i < serviceType.Instances.Count(); i++)
            {
                writeInstance(instances[i], serviceType);
            }
        }