本文整理汇总了C#中UpdateFlags类的典型用法代码示例。如果您正苦于以下问题:C# UpdateFlags类的具体用法?C# UpdateFlags怎么用?C# UpdateFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UpdateFlags类属于命名空间,在下文中一共展示了UpdateFlags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MongoUpdateOptions
/// <summary>
/// Initializes a new instance of the MongoUpdateOptions class.
/// </summary>
/// <param name="collection">The collection from which to get default settings for the options.</param>
public MongoUpdateOptions(
MongoCollection collection
) {
this.checkElementNames = true;
this.flags = UpdateFlags.None;
this.safeMode = collection.Settings.SafeMode;
}
示例2: MovementBlock
public MovementBlock(UpdateBlock update)
{
Update = update;
UpdateFlags = (UpdateFlags)update.ReadUShort();
ObjectTypeId = update.ObjectType;
this.Parse();
}
示例3: MongoUpdateMessage
// constructors
internal MongoUpdateMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkUpdateDocument, UpdateFlags flags, IMongoQuery query, IMongoUpdate update)
: base(MessageOpcode.Update, null, writerSettings)
{
this.collectionFullName = collectionFullName;
this.checkUpdateDocument = checkUpdateDocument;
this.flags = flags;
this.query = query;
this.update = update;
}
示例4: BeginProcessing
protected override void BeginProcessing()
{
if (_Update == null) throw new PSArgumentException(_UpdateError ?? TextParameterUpdate); //_131102_111738
if (Add)
_Flags |= UpdateFlags.Upsert;
if (All)
_Flags |= UpdateFlags.Multi;
}
示例5: MongoUpdateMessage
internal MongoUpdateMessage(
MongoConnection connection,
string collectionFullName,
UpdateFlags flags,
IMongoQuery query,
IMongoUpdate update
) :
base(connection, MessageOpcode.Update) {
this.collectionFullName = collectionFullName;
this.flags = flags;
this.query = query;
this.update = update;
}
示例6: ResetValues
public void ResetValues()
{
Radius = 0.6f;
Height = 2.0f;
MaxAcceleration = 8.0f;
MaxSpeed = 3.5f;
CollisionQueryRange = 0.6f*12.0f;
PathOptimizationRange = 0.6f*30.0f;
UpdateFlags = 0;
ObstacleAvoidanceType = 3;
SeparationWeight = 2.0f;
WaitForUpdate = 0.0f;
}
示例7: Awake
private void Awake()
{
this.UpgradeData();
if (this.data.font != null)
{
this._fontInst = this.data.font.inst;
}
this.updateFlags = UpdateFlags.UpdateBuffers;
if (this.data.font != null)
{
this.Init();
this.UpdateMaterial();
}
this.updateFlags = UpdateFlags.UpdateNone;
}
示例8: MongoUpdateMessage
// constructors
internal MongoUpdateMessage(
BsonBinaryWriterSettings writerSettings,
string collectionFullName,
bool checkUpdateDocument,
UpdateFlags flags,
int maxDocumentSize,
IMongoQuery query,
IMongoUpdate update)
: base(MessageOpcode.Update, writerSettings)
{
_collectionFullName = collectionFullName;
_checkUpdateDocument = checkUpdateDocument;
_flags = flags;
_maxDocumentSize = maxDocumentSize;
_query = query;
_update = update;
}
示例9: UpdateOperation
public UpdateOperation(
string databaseName,
string collectionName,
BsonBinaryReaderSettings readerSettings,
BsonBinaryWriterSettings writerSettings,
WriteConcern writeConcern,
IMongoQuery query,
IMongoUpdate update,
UpdateFlags flags,
bool checkElementNames)
: base(databaseName, collectionName, readerSettings, writerSettings, writeConcern)
{
_query = query;
_update = update;
_flags = flags;
_checkElementNames = checkElementNames;
}
示例10: Commit
/// <summary>
/// Call commit after changing properties to commit the changes.
/// This is deffered to a commit call as more than one operation may require rebuilding the buffers, eg. scaling and changing text.
/// This will be wasteful if performed multiple times.
/// </summary>
public void Commit()
{
// make sure fonts dictionary is initialized properly before proceeding
_font.InitDictionary();
// Can come in here without anything initalized when
// instantiated in code
if ((updateFlags & UpdateFlags.UpdateBuffers) != 0 || mesh == null)
{
Init();
}
else
{
if ((updateFlags & UpdateFlags.UpdateText) != 0)
{
int target = FillTextData();
for (int i = target; i < _maxChars; ++i)
{
// was/is unnecessary to fill anything else
vertices[i * 4 + 0] = vertices[i * 4 + 1] = vertices[i * 4 + 2] = vertices[i * 4 + 3] = Vector3.zero;
}
mesh.vertices = vertices;
mesh.uv = uvs;
if (font.textureGradients)
{
mesh.uv1 = uv2;
}
// comment this in for game if it becomes a problem
#if UNITY_EDITOR
mesh.RecalculateBounds();
#endif
}
if ((updateFlags & UpdateFlags.UpdateColors) != 0)
{
Color topColor = _color;
Color bottomColor = _useGradient ? _color2 : _color;
for (int i = 0; i < colors.Length; i += 4)
{
colors[i + 0] = colors[i + 1] = topColor;
colors[i + 2] = colors[i + 3] = bottomColor;
}
mesh.colors = colors;
}
}
updateFlags = UpdateFlags.UpdateNone;
}
示例11: Init
public void Init(bool force)
{
if (force)
{
updateFlags |= UpdateFlags.UpdateBuffers;
}
Init();
}
示例12: Update
public WriteConcernResult Update(IMongoQuery query, IMongoUpdate update, UpdateFlags flags, WriteConcern writeConcern, bool needResult)
{
return _this.Update(query, update, flags, writeConcern);
}
示例13: MongoUpdateOptions
// constructors
/// <summary>
/// Initializes a new instance of the MongoUpdateOptions class.
/// </summary>
public MongoUpdateOptions()
{
_checkElementNames = true;
_flags = UpdateFlags.None;
}
示例14: MongoUpdateOptions
// constructors
/// <summary>
/// Initializes a new instance of the MongoUpdateOptions class.
/// </summary>
public MongoUpdateOptions()
{
this.checkElementNames = true;
this.flags = UpdateFlags.None;
}
示例15: WriteTypeSpecificMovementUpdate
protected override void WriteTypeSpecificMovementUpdate(PrimitiveWriter writer, UpdateFieldFlags relation, UpdateFlags updateFlags)
{
base.WriteTypeSpecificMovementUpdate(writer, relation, updateFlags);
writer.Write(m_entry.VehicleId);
writer.Write(m_entry.VehicleAimAdjustment);
}