public void MergeFrom(TraceConfig other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.SamplerCase)
            {
            case SamplerOneofCase.ProbabilitySampler:
                if (ProbabilitySampler == null)
                {
                    ProbabilitySampler = new global::Opencensus.Proto.Trace.V1.ProbabilitySampler();
                }
                ProbabilitySampler.MergeFrom(other.ProbabilitySampler);
                break;

            case SamplerOneofCase.ConstantSampler:
                if (ConstantSampler == null)
                {
                    ConstantSampler = new global::Opencensus.Proto.Trace.V1.ConstantSampler();
                }
                ConstantSampler.MergeFrom(other.ConstantSampler);
                break;

            case SamplerOneofCase.RateLimitingSampler:
                if (RateLimitingSampler == null)
                {
                    RateLimitingSampler = new global::Opencensus.Proto.Trace.V1.RateLimitingSampler();
                }
                RateLimitingSampler.MergeFrom(other.RateLimitingSampler);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #2
0
        public void MergeFrom(TraceConfig other)
        {
            if (other == null)
            {
                return;
            }
            if (other.MaxNumberOfAttributes != 0L)
            {
                MaxNumberOfAttributes = other.MaxNumberOfAttributes;
            }
            if (other.MaxNumberOfAnnotations != 0L)
            {
                MaxNumberOfAnnotations = other.MaxNumberOfAnnotations;
            }
            if (other.MaxNumberOfMessageEvents != 0L)
            {
                MaxNumberOfMessageEvents = other.MaxNumberOfMessageEvents;
            }
            if (other.MaxNumberOfLinks != 0L)
            {
                MaxNumberOfLinks = other.MaxNumberOfLinks;
            }
            switch (other.SamplerCase)
            {
            case SamplerOneofCase.ProbabilitySampler:
                if (ProbabilitySampler == null)
                {
                    ProbabilitySampler = new global::Opencensus.Proto.Trace.V1.ProbabilitySampler();
                }
                ProbabilitySampler.MergeFrom(other.ProbabilitySampler);
                break;

            case SamplerOneofCase.ConstantSampler:
                if (ConstantSampler == null)
                {
                    ConstantSampler = new global::Opencensus.Proto.Trace.V1.ConstantSampler();
                }
                ConstantSampler.MergeFrom(other.ConstantSampler);
                break;

            case SamplerOneofCase.RateLimitingSampler:
                if (RateLimitingSampler == null)
                {
                    RateLimitingSampler = new global::Opencensus.Proto.Trace.V1.RateLimitingSampler();
                }
                RateLimitingSampler.MergeFrom(other.RateLimitingSampler);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }