static ShareUtil() { _urlAllowedCharacterSet = new NSMutableCharacterSet(); _urlAllowedCharacterSet.AddCharacters(new NSString("#")); _urlAllowedCharacterSet.UnionWith(NSUrlUtilities_NSCharacterSet.UrlHostAllowedCharacterSet); _urlAllowedCharacterSet.UnionWith(NSUrlUtilities_NSCharacterSet.UrlPathAllowedCharacterSet); _urlAllowedCharacterSet.UnionWith(NSUrlUtilities_NSCharacterSet.UrlQueryAllowedCharacterSet); _urlAllowedCharacterSet.UnionWith(NSUrlUtilities_NSCharacterSet.UrlFragmentAllowedCharacterSet); }
public MakeParser(NSString contents) { Contract.Requires(!NSObject.IsNullOrNil(contents), "contents is null"); m_scanner = NSScanner.scannerWithString(contents); m_scanner.setCharactersToBeSkipped(NSCharacterSet.whitespaceCharacterSet()); // does not include new lines m_scanner.setCaseSensitive(true); m_nameChars = NSMutableCharacterSet.Create(); m_nameChars.formUnionWithCharacterSet(NSCharacterSet.alphanumericCharacterSet()); m_nameChars.addCharactersInString(NSString.Create("_-")); m_eolChars = NSMutableCharacterSet.Create(); m_eolChars.addCharactersInString(NSString.Create("\r\n#")); // lines are ended by comments or new line characters DoParse(); for (int i = 0; i < 4; ++i) // add some blank lines so the user can define new variables that we couldn't pull out of the make file m_variables.Add(new Variable(string.Empty, string.Empty)); ActiveObjects.Add(this); }