Browse Source

Merge 949ff9bcaa into f291047ca4

pull/742/merge
Igor Evdokimov 10 years ago
parent
commit
f0b0f79e9b
  1. 9
      src/AddIns/BackendBindings/TypeScript/Project/Src/TypeScriptProject.cs

9
src/AddIns/BackendBindings/TypeScript/Project/Src/TypeScriptProject.cs

@ -128,14 +128,23 @@ namespace ICSharpCode.TypeScriptBinding
false); false);
} }
bool CheckIfProjNull( ) {
return msbuildProject == null;
}
bool GetBooleanProperty(string name, bool defaultValue) bool GetBooleanProperty(string name, bool defaultValue)
{ {
if (CheckIfProjNull())
return defaultValue;
string propertyValue = msbuildProject.GetEvaluatedProperty(name); string propertyValue = msbuildProject.GetEvaluatedProperty(name);
return ConvertBooleanValue(propertyValue, defaultValue); return ConvertBooleanValue(propertyValue, defaultValue);
} }
string GetStringProperty(string name, string defaultValue) string GetStringProperty(string name, string defaultValue)
{ {
if (CheckIfProjNull())
return defaultValue;
string propertyValue = msbuildProject.GetEvaluatedProperty(name); string propertyValue = msbuildProject.GetEvaluatedProperty(name);
if (!String.IsNullOrEmpty(propertyValue)) { if (!String.IsNullOrEmpty(propertyValue)) {
return propertyValue; return propertyValue;

Loading…
Cancel
Save