Class FileOptions
Inheritance
System.Object
FileOptions
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Protobuf.dll
Syntax
public sealed class FileOptions : IExtendableMessage<FileOptions>, IMessage<FileOptions>, IMessage, IEquatable<FileOptions>, IDeepCloneable<FileOptions>
Constructors
FileOptions()
Declaration
FileOptions(FileOptions)
Declaration
public FileOptions(FileOptions other)
Parameters
Fields
CcEnableArenasFieldNumber
Field number for the "cc_enable_arenas" field.
Declaration
public const int CcEnableArenasFieldNumber = 31
Field Value
Type |
Description |
System.Int32 |
|
CcGenericServicesFieldNumber
Field number for the "cc_generic_services" field.
Declaration
public const int CcGenericServicesFieldNumber = 16
Field Value
Type |
Description |
System.Int32 |
|
CsharpNamespaceFieldNumber
Field number for the "csharp_namespace" field.
Declaration
public const int CsharpNamespaceFieldNumber = 37
Field Value
Type |
Description |
System.Int32 |
|
DeprecatedFieldNumber
Field number for the "deprecated" field.
Declaration
public const int DeprecatedFieldNumber = 23
Field Value
Type |
Description |
System.Int32 |
|
GoPackageFieldNumber
Field number for the "go_package" field.
Declaration
public const int GoPackageFieldNumber = 11
Field Value
Type |
Description |
System.Int32 |
|
JavaGenerateEqualsAndHashFieldNumber
Field number for the "java_generate_equals_and_hash" field.
Declaration
public const int JavaGenerateEqualsAndHashFieldNumber = 20
Field Value
Type |
Description |
System.Int32 |
|
JavaGenericServicesFieldNumber
Field number for the "java_generic_services" field.
Declaration
public const int JavaGenericServicesFieldNumber = 17
Field Value
Type |
Description |
System.Int32 |
|
JavaMultipleFilesFieldNumber
Field number for the "java_multiple_files" field.
Declaration
public const int JavaMultipleFilesFieldNumber = 10
Field Value
Type |
Description |
System.Int32 |
|
JavaOuterClassnameFieldNumber
Field number for the "java_outer_classname" field.
Declaration
public const int JavaOuterClassnameFieldNumber = 8
Field Value
Type |
Description |
System.Int32 |
|
JavaPackageFieldNumber
Field number for the "java_package" field.
Declaration
public const int JavaPackageFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
JavaStringCheckUtf8FieldNumber
Field number for the "java_string_check_utf8" field.
Declaration
public const int JavaStringCheckUtf8FieldNumber = 27
Field Value
Type |
Description |
System.Int32 |
|
ObjcClassPrefixFieldNumber
Field number for the "objc_class_prefix" field.
Declaration
public const int ObjcClassPrefixFieldNumber = 36
Field Value
Type |
Description |
System.Int32 |
|
OptimizeForFieldNumber
Field number for the "optimize_for" field.
Declaration
public const int OptimizeForFieldNumber = 9
Field Value
Type |
Description |
System.Int32 |
|
PhpClassPrefixFieldNumber
Field number for the "php_class_prefix" field.
Declaration
public const int PhpClassPrefixFieldNumber = 40
Field Value
Type |
Description |
System.Int32 |
|
PhpGenericServicesFieldNumber
Field number for the "php_generic_services" field.
Declaration
public const int PhpGenericServicesFieldNumber = 42
Field Value
Type |
Description |
System.Int32 |
|
Field number for the "php_metadata_namespace" field.
Declaration
public const int PhpMetadataNamespaceFieldNumber = 44
Field Value
Type |
Description |
System.Int32 |
|
PhpNamespaceFieldNumber
Field number for the "php_namespace" field.
Declaration
public const int PhpNamespaceFieldNumber = 41
Field Value
Type |
Description |
System.Int32 |
|
PyGenericServicesFieldNumber
Field number for the "py_generic_services" field.
Declaration
public const int PyGenericServicesFieldNumber = 18
Field Value
Type |
Description |
System.Int32 |
|
RubyPackageFieldNumber
Field number for the "ruby_package" field.
Declaration
public const int RubyPackageFieldNumber = 45
Field Value
Type |
Description |
System.Int32 |
|
SwiftPrefixFieldNumber
Field number for the "swift_prefix" field.
Declaration
public const int SwiftPrefixFieldNumber = 39
Field Value
Type |
Description |
System.Int32 |
|
UninterpretedOptionFieldNumber
Field number for the "uninterpreted_option" field.
Declaration
public const int UninterpretedOptionFieldNumber = 999
Field Value
Type |
Description |
System.Int32 |
|
Properties
CcEnableArenas
Enables the use of arenas for the proto messages in this file. This applies
only to generated classes for C++.
Declaration
public bool CcEnableArenas { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CcGenericServices
Should generic services be generated in each language? "Generic" services
are not specific to any particular RPC system. They are generated by the
main code generators in each language (without additional plugins).
Generic services were the only kind of service generation supported by
early versions of google.protobuf.
Generic services are now considered deprecated in favor of using plugins
that generate code specific to your particular RPC system. Therefore,
these default to false. Old code which depends on generic services should
explicitly set them to true.
Declaration
public bool CcGenericServices { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CsharpNamespace
Namespace for generated classes; defaults to the package.
Declaration
public string CsharpNamespace { get; set; }
Property Value
Type |
Description |
System.String |
|
Deprecated
Is this file deprecated?
Depending on the target platform, this can emit Deprecated annotations
for everything in the file, or it will be completely ignored; in the very
least, this is a formalization for deprecating files.
Declaration
public bool Deprecated { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
GoPackage
Sets the Go package where structs generated from this .proto will be
placed. If omitted, the Go package will be derived from the following:
- The basename of the package import path, if provided.
- Otherwise, the package statement in the .proto file, if present.
- Otherwise, the basename of the .proto file, without extension.
Declaration
public string GoPackage { get; set; }
Property Value
Type |
Description |
System.String |
|
HasCcEnableArenas
Gets whether the "cc_enable_arenas" field is set
Declaration
public bool HasCcEnableArenas { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasCcGenericServices
Gets whether the "cc_generic_services" field is set
Declaration
public bool HasCcGenericServices { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasCsharpNamespace
Gets whether the "csharp_namespace" field is set
Declaration
public bool HasCsharpNamespace { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasDeprecated
Gets whether the "deprecated" field is set
Declaration
public bool HasDeprecated { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasGoPackage
Gets whether the "go_package" field is set
Declaration
public bool HasGoPackage { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaGenerateEqualsAndHash
Gets whether the "java_generate_equals_and_hash" field is set
Declaration
[Obsolete]
public bool HasJavaGenerateEqualsAndHash { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaGenericServices
Gets whether the "java_generic_services" field is set
Declaration
public bool HasJavaGenericServices { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaMultipleFiles
Gets whether the "java_multiple_files" field is set
Declaration
public bool HasJavaMultipleFiles { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaOuterClassname
Gets whether the "java_outer_classname" field is set
Declaration
public bool HasJavaOuterClassname { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaPackage
Gets whether the "java_package" field is set
Declaration
public bool HasJavaPackage { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasJavaStringCheckUtf8
Gets whether the "java_string_check_utf8" field is set
Declaration
public bool HasJavaStringCheckUtf8 { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasObjcClassPrefix
Gets whether the "objc_class_prefix" field is set
Declaration
public bool HasObjcClassPrefix { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasOptimizeFor
Gets whether the "optimize_for" field is set
Declaration
public bool HasOptimizeFor { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasPhpClassPrefix
Gets whether the "php_class_prefix" field is set
Declaration
public bool HasPhpClassPrefix { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasPhpGenericServices
Gets whether the "php_generic_services" field is set
Declaration
public bool HasPhpGenericServices { get; }
Property Value
Type |
Description |
System.Boolean |
|
Gets whether the "php_metadata_namespace" field is set
Declaration
public bool HasPhpMetadataNamespace { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasPhpNamespace
Gets whether the "php_namespace" field is set
Declaration
public bool HasPhpNamespace { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasPyGenericServices
Gets whether the "py_generic_services" field is set
Declaration
public bool HasPyGenericServices { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasRubyPackage
Gets whether the "ruby_package" field is set
Declaration
public bool HasRubyPackage { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasSwiftPrefix
Gets whether the "swift_prefix" field is set
Declaration
public bool HasSwiftPrefix { get; }
Property Value
Type |
Description |
System.Boolean |
|
JavaGenerateEqualsAndHash
This option does nothing.
Declaration
[Obsolete]
public bool JavaGenerateEqualsAndHash { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
JavaGenericServices
Declaration
public bool JavaGenericServices { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
JavaMultipleFiles
If set true, then the Java code generator will generate a separate .java
file for each top-level message, enum, and service defined in the .proto
file. Thus, these types will not be nested inside the outer class
named by java_outer_classname. However, the outer class will still be
generated to contain the file's getDescriptor() method as well as any
top-level extensions defined in the file.
Declaration
public bool JavaMultipleFiles { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
JavaOuterClassname
If set, all the classes from the .proto file are wrapped in a single
outer class with the given name. This applies to both Proto1
(equivalent to the old "--one_java_file" option) and Proto2 (where
a .proto always translates to a single class, but you may want to
explicitly choose the class name).
Declaration
public string JavaOuterClassname { get; set; }
Property Value
Type |
Description |
System.String |
|
JavaPackage
Sets the Java package where classes generated from this .proto will be
placed. By default, the proto package is used, but this is often
inappropriate because proto packages do not normally start with backwards
domain names.
Declaration
public string JavaPackage { get; set; }
Property Value
Type |
Description |
System.String |
|
JavaStringCheckUtf8
If set true, then the Java2 code generator will generate code that
throws an exception whenever an attempt is made to assign a non-UTF-8
byte sequence to a string field.
Message reflection will do the same.
However, an extension field still accepts non-UTF-8 byte sequences.
This option has no effect on when used with the lite runtime.
Declaration
public bool JavaStringCheckUtf8 { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ObjcClassPrefix
Sets the objective c class prefix which is prepended to all objective c
generated classes from this .proto. There is no default.
Declaration
public string ObjcClassPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
OptimizeFor
Declaration
public FileOptions.Types.OptimizeMode OptimizeFor { get; set; }
Property Value
Parser
Declaration
public static MessageParser<FileOptions> Parser { get; }
Property Value
PhpClassPrefix
Sets the php class prefix which is prepended to all php generated classes
from this .proto. Default is empty.
Declaration
public string PhpClassPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
PhpGenericServices
Declaration
public bool PhpGenericServices { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Use this option to change the namespace of php generated metadata classes.
Default is empty. When this option is empty, the proto file name will be
used for determining the namespace.
Declaration
public string PhpMetadataNamespace { get; set; }
Property Value
Type |
Description |
System.String |
|
PhpNamespace
Use this option to change the namespace of php generated classes. Default
is empty. When this option is empty, the package name will be used for
determining the namespace.
Declaration
public string PhpNamespace { get; set; }
Property Value
Type |
Description |
System.String |
|
PyGenericServices
Declaration
public bool PyGenericServices { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
RubyPackage
Use this option to change the package of ruby generated classes. Default
is empty. When this option is not set, the package name will be used for
determining the ruby package.
Declaration
public string RubyPackage { get; set; }
Property Value
Type |
Description |
System.String |
|
SwiftPrefix
By default Swift generators will take the proto package and CamelCase it
replacing '.' with underscore and use that to prefix the types/symbols
defined. When this options is provided, they will use this value instead
to prefix the types/symbols defined.
Declaration
public string SwiftPrefix { get; set; }
Property Value
Type |
Description |
System.String |
|
UninterpretedOption
The parser stores options it doesn't recognize here.
See the documentation for the "Options" section above.
Declaration
public RepeatedField<UninterpretedOption> UninterpretedOption { get; }
Property Value
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
ClearCcEnableArenas()
Clears the value of the "cc_enable_arenas" field
Declaration
public void ClearCcEnableArenas()
ClearCcGenericServices()
Clears the value of the "cc_generic_services" field
Declaration
public void ClearCcGenericServices()
ClearCsharpNamespace()
Clears the value of the "csharp_namespace" field
Declaration
public void ClearCsharpNamespace()
ClearDeprecated()
Clears the value of the "deprecated" field
Declaration
public void ClearDeprecated()
ClearExtension<TValue>(Extension<FileOptions, TValue>)
Declaration
public void ClearExtension<TValue>(Extension<FileOptions, TValue> extension)
Parameters
Type Parameters
Implements
ClearExtension<TValue>(RepeatedExtension<FileOptions, TValue>)
Declaration
public void ClearExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)
Parameters
Type Parameters
Implements
ClearGoPackage()
Clears the value of the "go_package" field
Declaration
public void ClearGoPackage()
ClearJavaGenerateEqualsAndHash()
Clears the value of the "java_generate_equals_and_hash" field
Declaration
[Obsolete]
public void ClearJavaGenerateEqualsAndHash()
ClearJavaGenericServices()
Clears the value of the "java_generic_services" field
Declaration
public void ClearJavaGenericServices()
ClearJavaMultipleFiles()
Clears the value of the "java_multiple_files" field
Declaration
public void ClearJavaMultipleFiles()
ClearJavaOuterClassname()
Clears the value of the "java_outer_classname" field
Declaration
public void ClearJavaOuterClassname()
ClearJavaPackage()
Clears the value of the "java_package" field
Declaration
public void ClearJavaPackage()
ClearJavaStringCheckUtf8()
Clears the value of the "java_string_check_utf8" field
Declaration
public void ClearJavaStringCheckUtf8()
ClearObjcClassPrefix()
Clears the value of the "objc_class_prefix" field
Declaration
public void ClearObjcClassPrefix()
ClearOptimizeFor()
Clears the value of the "optimize_for" field
Declaration
public void ClearOptimizeFor()
ClearPhpClassPrefix()
Clears the value of the "php_class_prefix" field
Declaration
public void ClearPhpClassPrefix()
ClearPhpGenericServices()
Clears the value of the "php_generic_services" field
Declaration
public void ClearPhpGenericServices()
Clears the value of the "php_metadata_namespace" field
Declaration
public void ClearPhpMetadataNamespace()
ClearPhpNamespace()
Clears the value of the "php_namespace" field
Declaration
public void ClearPhpNamespace()
ClearPyGenericServices()
Clears the value of the "py_generic_services" field
Declaration
public void ClearPyGenericServices()
ClearRubyPackage()
Clears the value of the "ruby_package" field
Declaration
public void ClearRubyPackage()
ClearSwiftPrefix()
Clears the value of the "swift_prefix" field
Declaration
public void ClearSwiftPrefix()
Clone()
Declaration
public FileOptions Clone()
Returns
Implements
Equals(FileOptions)
Declaration
public bool Equals(FileOptions other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetExtension<TValue>(Extension<FileOptions, TValue>)
Declaration
public TValue GetExtension<TValue>(Extension<FileOptions, TValue> extension)
Parameters
Returns
Type Parameters
Implements
GetExtension<TValue>(RepeatedExtension<FileOptions, TValue>)
Declaration
public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)
Parameters
Returns
Type Parameters
Implements
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
GetOrInitializeExtension<TValue>(RepeatedExtension<FileOptions, TValue>)
Declaration
public RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)
Parameters
Returns
Type Parameters
Implements
HasExtension<TValue>(Extension<FileOptions, TValue>)
Declaration
public bool HasExtension<TValue>(Extension<FileOptions, TValue> extension)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Implements
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
MergeFrom(FileOptions)
Declaration
public void MergeFrom(FileOptions other)
Parameters
Implements
SetExtension<TValue>(Extension<FileOptions, TValue>, TValue)
Declaration
public void SetExtension<TValue>(Extension<FileOptions, TValue> extension, TValue value)
Parameters
Type Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements
Extension Methods