Microsoft.Protocols.TestSuites.Pchc.ServerHelper.ConvertToStackForSegDescription C# (CSharp) Method

ConvertToStackForSegDescription() private static method

Convert the SegmentDescription struct defined in adapter to stack
private static ConvertToStackForSegDescription ( SegmentDescription segmentDescription ) : TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[]
segmentDescription SegmentDescription The segments field is composed of a number cSegments /// of SegmentDescription fields. Each SegmentDescription field corresponds to a content segment /// in the order in which they appear in the original content. ///
return TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[]
        private static TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[] ConvertToStackForSegDescription(
            SegmentDescription[] segmentDescription)
        {
            TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[] segmentDescriptionStack
                = new TestTools.StackSdk.BranchCache.Pccrc.SegmentDescription[segmentDescription.Length];
            for (int i = 0; i < segmentDescriptionStack.Length; i++)
            {
                segmentDescriptionStack[i].cbBlockSize = segmentDescription[i].CbBlockSize;
                segmentDescriptionStack[i].cbSegment = segmentDescription[i].CbSegment;
                segmentDescriptionStack[i].SegmentHashOfData = segmentDescription[i].SegmentHashOfData;
                segmentDescriptionStack[i].SegmentSecret = segmentDescription[i].SegmentSecret;
                segmentDescriptionStack[i].ullOffsetInContent = segmentDescription[i].UllOffsetInContent;
            }

            return segmentDescriptionStack;
        }