示例#1
0
        public void SetValues(Span <LCValue> kv)
        {
            fixed(LCValue *ptr = &kv.GetPinnableReference())
            this.values = ptr;

            this.length = kv.Length;
        }
示例#2
0
        public LCSection(ReadOnlySpan <char> name, Span <LCValue> kv)
        {
            if (!name.IsEmpty)
            {
                fixed(char *ptr = &name.GetPinnableReference())
                this.name = ptr;
            }
            else
            {
                this.name = null;
            }

            if (!kv.IsEmpty)
            {
                fixed(LCValue *ptr = &kv.GetPinnableReference())
                this.values = ptr;
            }
            else
            {
                this.values = null;
            }

            this.nameLength = name.Length;
            this.length     = kv.Length;
        }