Lines Matching refs:field
43 /// Container for a set of custom options specified within a message, field etc.
75 /// Retrieves a Boolean value for the specified option field.
77 /// <param name="field">The field to fetch the value for.</param>
79 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
80 public bool TryGetBool(int field, out bool value) => TryGetPrimitiveValue(field, out value);
83 /// Retrieves a signed 32-bit integer value for the specified option field.
85 /// <param name="field">The field to fetch the value for.</param>
87 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
88 public bool TryGetInt32(int field, out int value) => TryGetPrimitiveValue(field, out value);
91 /// Retrieves a signed 64-bit integer value for the specified option field.
93 /// <param name="field">The field to fetch the value for.</param>
95 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
96 public bool TryGetInt64(int field, out long value) => TryGetPrimitiveValue(field, out value);
99 /// Retrieves an unsigned 32-bit integer value for the specified option field,
102 /// <param name="field">The field to fetch the value for.</param>
104 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
105 public bool TryGetFixed32(int field, out uint value) => TryGetUInt32(field, out value);
108 /// Retrieves an unsigned 64-bit integer value for the specified option field,
111 /// <param name="field">The field to fetch the value for.</param>
113 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
114 public bool TryGetFixed64(int field, out ulong value) => TryGetUInt64(field, out value);
117 /// Retrieves a signed 32-bit integer value for the specified option field,
120 /// <param name="field">The field to fetch the value for.</param>
122 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
123 public bool TryGetSFixed32(int field, out int value) => TryGetInt32(field, out value);
126 /// Retrieves a signed 64-bit integer value for the specified option field,
129 /// <param name="field">The field to fetch the value for.</param>
131 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
132 public bool TryGetSFixed64(int field, out long value) => TryGetInt64(field, out value);
135 /// Retrieves a signed 32-bit integer value for the specified option field,
138 /// <param name="field">The field to fetch the value for.</param>
140 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
141 public bool TryGetSInt32(int field, out int value) => TryGetPrimitiveValue(field, out value);
144 /// Retrieves a signed 64-bit integer value for the specified option field,
147 /// <param name="field">The field to fetch the value for.</param>
149 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
150 public bool TryGetSInt64(int field, out long value) => TryGetPrimitiveValue(field, out value);
153 /// Retrieves an unsigned 32-bit integer value for the specified option field.
155 /// <param name="field">The field to fetch the value for.</param>
157 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
158 public bool TryGetUInt32(int field, out uint value) => TryGetPrimitiveValue(field, out value);
161 /// Retrieves an unsigned 64-bit integer value for the specified option field.
163 /// <param name="field">The field to fetch the value for.</param>
165 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
166 public bool TryGetUInt64(int field, out ulong value) => TryGetPrimitiveValue(field, out value);
169 /// Retrieves a 32-bit floating point value for the specified option field.
171 /// <param name="field">The field to fetch the value for.</param>
173 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
174 public bool TryGetFloat(int field, out float value) => TryGetPrimitiveValue(field, out value);
177 /// Retrieves a 64-bit floating point value for the specified option field.
179 /// <param name="field">The field to fetch the value for.</param>
181 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
182 public bool TryGetDouble(int field, out double value) => TryGetPrimitiveValue(field, out value);
185 /// Retrieves a string value for the specified option field.
187 /// <param name="field">The field to fetch the value for.</param>
189 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
190 public bool TryGetString(int field, out string value) => TryGetPrimitiveValue(field, out value);
193 /// Retrieves a bytes value for the specified option field.
195 /// <param name="field">The field to fetch the value for.</param>
197 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
198 public bool TryGetBytes(int field, out ByteString value) => TryGetPrimitiveValue(field, out value);
201 /// Retrieves a message value for the specified option field.
203 /// <param name="field">The field to fetch the value for.</param>
205 /// <returns><c>true</c> if a suitable value for the field was found; <c>false</c> otherwise.</returns>
206 public bool TryGetMessage<T>(int field, out T value) where T : class, IMessage, new()
215 if (values.TryGetValue(field, out extensionValue))
243 private bool TryGetPrimitiveValue<T>(int field, out T value)
252 if (values.TryGetValue(field, out extensionValue))