コード例 #1
0
		private bool WritePropertyKeywords(PropertyDefinition property)
		{
			if (!property.IsNewSlot())
			{
				if (property.IsFinal())
				{
					WriteKeyword(KeyWordWriter.SealedMethod);
					WriteSpace();
				}
				WriteKeyword(KeyWordWriter.Override);
				return true;
			}
			else if (property.IsAbstract())
			{
				WriteKeyword(KeyWordWriter.AbstractMember);
				return true;
			}
			else
			{
				if (!property.IsFinal() && !property.DeclaringType.IsSealed)
				{
					WriteKeyword(KeyWordWriter.Virtual);
					return true;
				}
			}
			return false;
		}
コード例 #2
0
		protected override void Write(PropertyDefinition property)
		{
			if (property.IsAbstract() || this.TypeContext.AutoImplementedProperties.Contains(property))
			{
				WritePropertyDeclaration(property);
				this.currentWritingInfo.MemberDefinitionToFoldingPositionMap[property] = new OffsetSpan(formatter.CurrentPosition, formatter.CurrentPosition);
			}
			else
			{
				base.Write(property);
			}
		}