コード例 #1
0
        /// <summary>
        /// Used to return the length of this element.
        /// </summary>
        /// <param name="byteArray">A Byte array</param>
        /// <param name="startIndex">Start position</param>
        /// <returns>The element length</returns>
        public override int DeserializeDataElementDataFromByteArray(byte[] byteArray, int startIndex)
        {
            int index = startIndex;

            this.CellManifestCurrentRevision = StreamObject.GetCurrent <CellManifestCurrentRevision>(byteArray, ref index);
            return(index - startIndex);
        }
コード例 #2
0
 /// <summary>
 /// Used to return the length of this element.
 /// </summary>
 /// <param name="byteArray">A Byte array</param>
 /// <param name="startIndex">Start position</param>
 /// <returns>The element length</returns>
 public override int DeserializeDataElementDataFromByteArray(byte[] byteArray, int startIndex)
 {
     int index = startIndex;
     this.CellManifestCurrentRevision = StreamObject.GetCurrent<CellManifestCurrentRevision>(byteArray, ref index);
     return index - startIndex;
 }
コード例 #3
0
        /// <summary>
        /// This method is used to test cell manifest current revision related adapter requirements.
        /// </summary>
        /// <param name="instance">Specify the instance which need to be verified.</param> 
        /// <param name="site">Specify the ITestSite instance.</param>
        public void VerifyCellManifestCurrentRevision(CellManifestCurrentRevision instance, ITestSite site)
        {
            // If the instance is not null and there are no parsing errors, then the CellManifestCurrentRevision related adapter requirements can be directly captured.
            if (null == instance)
            {
                site.Assert.Fail("The instance of type CellManifestCurrentRevision is null due to parsing error or type casting error.");
            }

            // Verify the stream object header related requirements.
            this.ExpectStreamObjectHeaderStart(instance.StreamObjectHeaderStart, instance.GetType(), site);

            // Directly capture requirement MS-FSSHTTPB_R286, if the stream object header is StreamObjectHeaderStart16bit.
            site.CaptureRequirementIfAreEqual<Type>(
                     typeof(StreamObjectHeaderStart16bit),
                     instance.StreamObjectHeaderStart.GetType(),
                     "MS-FSSHTTPB",
                     286,
                     @"[In Cell Manifest Data Element] Cell Manifest Current Revision (2 bytes): A 16-bit stream object header that specifies a cell manifest current revision.");

            // Directly capture requirement MS-FSSHTTPB_R287, if there are no parsing errors. 
            site.CaptureRequirement(
                     "MS-FSSHTTPB",
                     287,
                     @"[In Cell Manifest Data Element] Cell Manifest Current Revision Extended GUID (variable): An extended GUID that specifies the revision.");

            // Verify the stream object header related requirements.
            this.ExpectSingleObject(instance.StreamObjectHeaderStart, site);
        }