W>ReSharper | Options | Code Editing | C# | Formatting Style | Other
W>там в группе Align Multiline Construct есть Anonymous method body
Спасибо,
Снял галку Anonymous method body, теперь конструкция указанная мной в первом письме форматируется при вводе ; или } следующим образом:
_cache.ExecuteOperation(ReferencingEntity.GetType(),
() =>
{
LogicalContext referencingEntityLogicalContext = this.referencingEntityLogicalContext;
if (referencingEntityLogicalContext != null)
{
_cache.RegisterManyToOneReference(referencingEntityLogicalContext, this);
}
else
{
_cache.EntityLoaded += (sender, args) =>
{
if (args.LoadedEntity == ReferencingEntity)
{
_cache.RegisterManyToOneReference(this.referencingEntityLogicalContext, this);
if (ResolveReferencedIdMode == ResolveReferencedIdMode.Eager)
{
this.setValue();
}
}
};
}
});
Это лучше, но все равно не то. Мне нужно чтобы Решарпер вообще никак не трогал мою конструкцию и оставлял мое форматирование.