public override bool IsSettable(PSAdaptedProperty property) { if (property != null) { ADEntity baseObject = property.BaseObject as ADEntity; if (baseObject != null) { PropertyInfo dotNetProperty = baseObject.GetDotNetProperty(property.Name); if (dotNetProperty == null) { return(baseObject.PropertyIsWritable(property.Name)); } else { return(dotNetProperty.CanWrite); } } else { object[] typeAdapterTypeName = new object[2]; typeAdapterTypeName[0] = ADEntityAdapter.TypeAdapterTypeName; typeAdapterTypeName[1] = ADEntityAdapter.ADEntityTypeName; throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, StringResources.TypeAdapterForADEntityOnly, typeAdapterTypeName)); } } else { throw new ArgumentNullException("property"); } }