コード例 #1
0
        SafeAlpcMessageAttributesBuffer IMessageAttributes.ToSafeBuffer()
        {
            if (_attributes.Count == 0)
            {
                return(SafeAlpcMessageAttributesBuffer.Null);
            }

            AlpcMessageAttributeFlags flags = AllocatedAttributes;

            using (var buffer = SafeAlpcMessageAttributesBuffer.Create(flags)) {
                foreach (var attr in _attributes.Values)
                {
                    attr.ToSafeBuffer(buffer);
                }

                var result = buffer.Result;
                result.ValidAttributes = flags;
                buffer.Result          = result;
                return(buffer.Detach());
            }
        }
コード例 #2
0
 SafeAlpcMessageAttributesBuffer IMessageAttributes.ToSafeBuffer()
 {
     return(SafeAlpcMessageAttributesBuffer.Create(AllocatedAttributes));
 }